我正在使用新的毕业生构建系统,我正面临以下问题:
UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/kibo/mobi/BuildConfig; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103)
依赖关系我看不到任何东西,这里是:
firstDebugCompile - ## Internal use,do not manually configure ## \--- KiboGradle:KiboSDK:unspecified +--- KiboGradle:TextInputAPI:unspecified +--- KiboGradle:VoiceImeUtils:unspecified +--- com.google.android.gms:play-services:5.0.77 | \--- com.android.support:support-v4:19.1.0 +--- com.squareup.picasso:picasso:2.3.2 +--- com.google.code.gson:gson:2.2.4 \--- com.crittercism:crittercism-android-agent:4.5.1
compile ('com.google.android.gms:play-services:5.0.77'){ exclude module: 'support-v4' }
哪些导致一些支持-V4库类找不到的错误,所以这个库不能从任何其他位置编译.
我想到的一件事可能是导致这个问题的事实是,我使用Flavors feautre in oreder来创建我的应用程序的不同版本的文件.
** * Automatically generated file. DO NOT MODIFY */ package com.kibo.mobi; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String PACKAGE_NAME = "com.kibo.mobi.test.official"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = "liverpool"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
所以包中的文件和包中指定的String值是不一样的.
任何人都可以看到我的配置中可能导致此问题的任何问题?