为什么我不能这样做?
>使用ProductFlavor(名称为生产)
> Android Gradle ver.1.1.0-rc1
问题
./gradlew assembleProductionDeBUG dIEd unexpectedly Building 92%3% >
:app:preDexProductionDeBUGaction ./gradlew assembleProductionDeBUG
Failed
circle.yml
general: artifacts: - "app/build/outputs/apk/app-production-release-unaligned.apk"machine: java: version: openjdk7 environment: ANDROID_HOME: /usr/local/androID-sdk-linuxdependencIEs: pre: - echo y | androID update sdk --no-ui --all --filter "build-tools-21.1.2" - echo y | androID update sdk --no-ui --all --filter "platform-tools" - echo y | androID update sdk --no-ui --all --filter "tools" - echo y | androID update sdk --no-ui --all --filter "extra-Google-Google_play_services" - echo y | androID update sdk --no-ui --all --filter "extra-Google-m2repository" - echo y | androID update sdk --no-ui --all --filter "extra-androID-m2repository" - echo y | androID update sdk --no-ui --all --filter "extra-androID-support" - echo y | androID update sdk --no-ui --all --filter "androID-21" - git submodule sync - git submodule update --init cache_directorIEs: - ~/.androID - ~/androID overrIDe: - ./gradlew dependencIEstest: overrIDe: - ./gradlew testdeployment: master: branch: master commands: - ./gradlew assembleProductionDeBUG解决方法 我遇到过同样的问题.事实证明,我必须为ci版本禁用preDex.
把它放在root build.gradle中:
project.ext.preDexlibs = !project.hasProperty('disablePreDex')subprojects { project.plugins.whenPluginAdded { plugin -> if ("com.androID.build.gradle.AppPlugin".equals(plugin.class.name)) { project.androID.dexOptions.preDexlibrarIEs = rootProject.ext.preDexlibs } else if ("com.androID.build.gradle.libraryPlugin".equals(plugin.class.name)) { project.androID.dexOptions.preDexlibrarIEs = rootProject.ext.preDexlibs } }}
然后,您可以使用以下命令构建ci:
./gradlew ... -PdisablePreDex总结
以上是内存溢出为你收集整理的android – Gradle assembleDebug和preDexDebug因CircleCI而失败全部内容,希望文章能够帮你解决android – Gradle assembleDebug和preDexDebug因CircleCI而失败所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)