【发布时间】:2018-06-04 18:32:27
【问题描述】:
我正在尝试做cordova build android,它失败了
Could not determine the dependencies of task ':compileDebugJavaWithJavac'.
无法解析配置“:debugCompileClasspath”的所有任务依赖项。 无法解析项目:CordovaLib。 要求: 项目 : 项目:声明从配置“debugCompile”到配置“调试”的依赖关系,该依赖关系未在项目描述符中声明:CordovaLib。
我知道如果我替换这两行
debugCompile(project(path: "CordovaLib", configuration: "debug"))
releaseCompile(project(path: "CordovaLib", configuration: "release"))
在 android studio 中使用这个(直接在 build.gradle 中)
compile project(':CordovaLib')
然后它工作,我的意思是它构建。但是由于该项目位于 Ionic / Cordova 中,当我尝试使用 cordova build android 构建它时,它再次失败并出现上述错误,因为更改被 Gradlebuilder.js 文件覆盖,返回到上述 2 行调试和发布编译。
我想知道我应该在 gradlebuilder.js 中进行哪些更改以及在哪里进行更改,所以我将这两行替换为
compile project(':CordovaLib')
感谢任何帮助。
【问题讨论】:
标签: android cordova android-gradle-plugin ionic3 build.gradle