我在数年前就开发了一个正在使用的应用程序(标准版)的签名APK。
我现在正在尝试编译该项目的改造件,同步阶段运行良好,但是当我尝试运行该应用程序时出现此错误:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException:
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process
'command'/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java''
finished with non-zero exit value 2
我尝试在新项目上编译Retrofit,并且确实进行了编译。
这里是依赖项(我试图单独评论简单的xml,也没有帮助):
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/UniversalImageLoader195.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
//compile 'com.squareup.retrofit2:retrofit:2.0.1'
//compile 'com.squareup.retrofit2:converter-simplexml:2.0.0-beta3'
}
任何的想法?
最佳答案
尝试使用一些较新版本的改造:
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
关于android - Android Studio无法编译改造,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36594671/