当我尝试生成签名的 APK 时出现错误。
错误日志:
错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
错误:任务“:HoppingMouse:transformClassesWithDexForRelease”执行失败。com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:java.lang.UnsupportedOperationException
构建.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "bb.HoppingMouse"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile files('libs/android-support-v4.jar')
compile 'com.google.android.gms:play-services-ads:9.4.0'
}
build.gradle 模块:googleplayservices_lib
apply plugin: 'com.android.library'
android {
compileSdkVersion 19
buildToolsVersion "24.0.2"
defaultConfig {
minSdkVersion 8
targetSdkVersion 8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile files('libs/google-play-services.jar')
}