添加新的支持设计库时出现ExecException

时间:2015-05-31 20:03:48

标签: android android-gradle

我正在尝试将新的支持设计库添加到我的项目中:

  

编译'com.android.support:design:22.2.0'

但是一旦我尝试编译,我就会收到以下错误:

  

错误:任务':app:dexDebug'的执行失败。   com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\ Program Files \ Java \ jdk1.8.0_40 \ bin \ java.exe''以非完成零退出值3

我已经达到65k方法限制了一些库,所以我已经添加了MultiDex支持并解决了这个问题。

以下是我的所有依赖项,如果它有帮助:

compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
compile('com.crashlytics.sdk.android:crashlytics:2.2.2@aar') {
    transitive = true;
}
compile 'com.helpshift:android-aar:3.8.0'
compile 'com.google.maps.android:android-maps-utils:0.3+'
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:cardview-v7:22.0.0'
compile 'com.loopj.android:android-async-http:1.4.5'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.kierans:ViewPagerIndicator:138e5f5bd9'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.balysv:material-ripple:1.0.2'
compile 'it.neokree:MaterialNavigationDrawer:1.3.3'
compile 'pl.charmas.android:android-reactive-location:0.6@aar'
compile 'io.reactivex:rxjava:1.0.10'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'

我知道它们很多,但我需要它们。

1 个答案:

答案 0 :(得分:2)

您应该考虑更改compile 'com.google.android.gms:play-services:7.5.0'依赖关系,并只抓取部分Play服务。

您可以在https://developers.google.com/android/guides/setup#split看到该指南,这也很可能解决您的65k问题。