为什么 "Unable to pre-dex - Error while signing the application" 错误发生在 Android Studio 上?
Why is "Unable to pre-dex - Error while signing the application" error happening on Android Studio?
签名发布(Build / Generate Signed Apk...)[=34=上的程序时显示此错误 ]工作室。
- 当我运行程序没有签名时,我没问题,它
运行s 正确,但是如果我使用签名文件,我会遇到
这个错误。
Stacktrace ScrenShot 1
Stacktrace ScrenShot 2
App build.gradle 代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.app"
minSdkVersion 16
targetSdkVersion 27
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-crash:11.8.0'
...
implementation 'com.path:android-priority-jobqueue:1.1.2'
implementation 'com.birbit:android-priority-jobqueue:2.0.1'
implementation 'com.android.volley:volley:1.1.0'
...
}
apply plugin: 'com.google.gms.google-services'
您的项目包含的依赖库有问题。
替换
编译'com.path:android-priority-jobqueue:1.1.2'
至
compile ('com.path:android-priority-jobqueue:1.1.2'){
exclude group: 'com.google.android'
}
签名发布(Build / Generate Signed Apk...)[=34=上的程序时显示此错误 ]工作室。
- 当我运行程序没有签名时,我没问题,它 运行s 正确,但是如果我使用签名文件,我会遇到 这个错误。
Stacktrace ScrenShot 1
Stacktrace ScrenShot 2
App build.gradle 代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.app"
minSdkVersion 16
targetSdkVersion 27
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-crash:11.8.0'
...
implementation 'com.path:android-priority-jobqueue:1.1.2'
implementation 'com.birbit:android-priority-jobqueue:2.0.1'
implementation 'com.android.volley:volley:1.1.0'
...
}
apply plugin: 'com.google.gms.google-services'
您的项目包含的依赖库有问题。
替换
编译'com.path:android-priority-jobqueue:1.1.2'
至
compile ('com.path:android-priority-jobqueue:1.1.2'){
exclude group: 'com.google.android'
}