请问一下,腾讯会议SDK接入Android端,项目在settings.gradle配置,
由于gradle最新的rootProject 类中已经没有rootDir属性,输入以下语句会报错:
url "file://${new File(project,rootProject.rootDir,'repo').getAbsolutePath()}"
尝试更改为:
url "file://${new File(rootProject.projectDir,'repo').getAbsolutePath()}"
可以成功,但不确定是否和文档中原来的能够一致?
①在pluginManagement中输入:url "file://${new File(project.rootProject.rootDir, 'repo').getAbsolutePath()}"
报错内容:Could not get unknown property 'project' for object of type org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.
②在repositories中输入:url "file://${new File(project.rootProject.rootDir, 'repo').getAbsolutePath()}"
③在dependencyResolutionManagement中输入:url "file://${new File(project.rootProject.rootDir, 'repo').getAbsolutePath()}"
报错内容:Could not get unknown property 'project' for repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.
④尝试
def repoDir = new File(rootProject.rootDir, 'repo').getAbsolutePath()
dependencyResolutionManagement {
repositories {
maven {
url "file://${repoDir}"
}
}
}
报错内容:No such property: rootDir for class: org.gradle.initialization.DefaultProjectDescriptor