Android Studio 3.0子模块编译失败 [英] Android Studio 3.0 submodule compile failed
本文介绍了Android Studio 3.0子模块编译失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
应用程序级别构建gradle依赖项
App level build gradle dependencies
devCompile project(path: ':mymodule', configuration: 'devRelease')
proCompile project(path: ':mymodule', configuration: 'proRelease')
qaCompile project(path: ':mymodule', configuration: 'qaRelease')
offlineCompile project(path: ':mymodule', configuration: 'offlineRelease')
提到
publishNonDefault true
flavorDimensions "default"
我尝试了这个已接受的答案,但是没有用.
I have tried This accepted answer but didn't work.
更新: 看看我要编译的库gradle风格.我的应用程序模块中提到了相同的口味.
Update: Look at the library gradle flavor that I want to compile. I have the same flavor mentioned in my app's Module.
dev {
manifestPlaceholders = [facebookId: "SOME_FACEBOOK_ID_1"]
}
pro {
manifestPlaceholders = [facebookId: "SOME_FACEBOOK_ID_2"]
}
qa {
manifestPlaceholders = [facebookId: "SOME_FACEBOOK_ID_3"]
}
offline {
manifestPlaceholders = [facebookId: "SOME_FACEBOOK_ID_4"]
}
推荐答案
您只需减少提供的详细信息:
You just need to reduce the details you provide:
compile project(path: ':mymodule')
现在详细说明哪些内容由gradle自己决定.因此它变得更容易.现在只需上面的内容,而不是4行.
The details what in which configuration is decided by gradle now by themselves. So it became way easier. Instead of 4 lines you just need the above now.
还要从模块gradle中删除publishNonDefault true
.不再需要.
Also remove the publishNonDefault true
from your modules gradle. It is not needed anymore.
这篇关于Android Studio 3.0子模块编译失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文