我正在将我们的Gradle应用从Android SDK 23更新为24(25也无法正常工作),并且收到以下错误。
Execution failed for task :app:transformClassesWithMultidexlistForGoogleRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\android\jdk\bin\java.exe'' finished with non-zero exit value 1
我尝试构建24和25,我可以找到构建工具的每个变体,它们都会产生此错误。我通过构建清理或添加我们已经使用的multidex解决了此错误在线看到的大多数情况。
我也尝试过更改java max heap size。
有关如何解决这个问题的想法,或者弄清楚实际发生了什么?
要求的依赖性阻止:
dependencies {
//classpath 'com.google.gms:google-services:3.0.0'
// Google Support Services
compile 'com.android.support:appcompat-v7:23.3.0'
//googleCompile 'com.google.android.gms:play-services:9.0.2' // (Updated Aug 19, 2016)
googleCompile 'com.google.android.gms:play-services-base:9.0.2' // (Updated Aug 19, 2016)
googleCompile 'com.google.android.gms:play-services-plus:9.0.2' // (Updated Aug 19, 2016)
googleCompile 'com.google.android.gms:play-services-gcm:9.0.2' // (Updated Aug 19, 2016)
googleCompile 'com.google.android.gms:play-services-games:9.0.2' // (Updated Aug 19, 2016)
//ad mob
googleCompile 'com.google.android.gms:play-services-ads-lite:9.0.2'
googleCompile 'com.google.firebase:firebase-ads:9.0.2'
// For multidex support for devices <= V20
compile 'com.android.support:multidex:1.0.1'
// Help Shift (Updated Dec 8, 2015)
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.helpshift:android-aar:4.2.0-support'
// Facebook (Updated Jan 27, 2015)
compile 'com.facebook.android:facebook-android-sdk:4.10.0'
// Crashalytics (Updated Jan 8, 2016)
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
compile ('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2@aar') {
transitive = true
}
// Fyber (Updated Dec 3, 2015)
// begin (Update Fyber May 20, 2016)
compile 'com.fyber:fyber-sdk:8.5.1'
provided 'com.fyber:fyber-annotations:1.2.0'
provided 'com.fyber:fyber-annotations-compiler:1.3.0'
// Fyber Ad Networks
compile 'com.fyber.mediation:adcolony:2.3.6-r2@aar'
compile 'com.fyber.mediation:flurry:6.4.0-r1@aar'
compile 'com.fyber.mediation:vungle:4.0.2-r1@aar'
compile 'com.fyber.mediation:unityads:2.0.2-r1@aar'
compile 'com.fyber.mediation:chartboost:6.5.0-r1@aar'
compile 'com.fyber.mediation:applovin:6.3.0-r1@aar'
compile 'com.fyber.mediation:hyprmx:4.0.1-r3@aar'
// end (Update Fyber May 20, 2016)
compile(name:'fyber-facebook-4.11.0-r2', ext:'aar')
// Vungle third-party dependencies (Updated Dec 8, 2015)
compile 'com.google.dagger:dagger:2.4'
compile 'javax.inject:javax.inject:1'
// Kiip SDK (Updated Dec 4, 2015)
googleCompile project(':3rd:kiip')
// MoPub SDK (Updated Jan 27, 2016)
googleCompile project(':3rd:mopub-sdk')
// Swrve SDK (Updated Dec 7, 2015)
//amazonCompile 'com.swrve.sdk.android:swrve:4.0.2'
googleCompile 'com.swrve.sdk.android:swrve-google:4.4.0'
// Compile the libs in the libs folder
//compile fileTree(dir: 'libs', include: ['*.jar'])
compile files(
'libs/fmodex.jar',
'libs/tapjoyconnectlibrary.jar' // (Updated Dec 8, 2015)
)
amazonCompile files('libs/in-app-purchasing-2.0.61.jar')
googleCompile files('libs/KochavaSDK.jar') // (Updated Dec 8, 2015)
googleCompile files('libs/tapjoy_mopub_v4.0.0.jar')
googleCompile files('libs/tapjoy-android-fyber-4.0.0.jar')
// Tests
testCompile 'junit:junit:4.12'
}