其他分享
首页 > 其他分享> > Android Studio 3.0子模块编译失败

Android Studio 3.0子模块编译失败

作者:互联网

应用程序级别构建Gradle依赖项

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"

我尝试了This accepted answer,但是没有用.

更新:
看一下我要编译的库gradle版本.我的应用程序模块中提到了相同的风格.

        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"]
        }

解决方法:

您只需要减少提供的详细信息即可:

compile project(path: ':mymodule')

现在详细说明哪些配置由gradle自己决定.因此它变得更容易.而不是4行,您现在只需要上面的内容.

还要从模块gradle中删除publishNonDefault true.不再需要它.

标签:android-studio-3-0,build-gradle,android
来源: https://codeday.me/bug/20191110/2015077.html