Android – unable to generate signed APK – taskexecutionexception failed
•
Android
I'm in the final step of making my application. When I try to build and generate a signed APK, I get this error log from Proguard
This is my plan
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keepattributes LineNumberTable,SourceFile
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
Building gradle
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'Meta-INF/DEPENDENCIES.txt'
exclude 'Meta-INF/LICENSE.txt'
exclude 'Meta-INF/NOTICE.txt'
exclude 'Meta-INF/NOTICE'
exclude 'Meta-INF/LICENSE'
exclude 'Meta-INF/DEPENDENCIES'
exclude 'Meta-INF/notice.txt'
exclude 'Meta-INF/license.txt'
exclude 'Meta-INF/dependencies.txt'
exclude 'Meta-INF/LGPL2.1'
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.app"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-compat:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.firebase:firebase-crash:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.github.rey5137:material:1.2.4'
implementation 'com.firebaseui:firebase-ui-database:3.3.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'joda-time:joda-time:2.9.9'
implementation 'com.google.code.findbugs:jsr305:2.0.1'
implementation "com.andkulikov:transitionseverywhere:1.7.7"
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
resolvent:
Just add - ignorewarnings to Proguard. Please note that this method is not recommended. You should fix the warnings, but it will help if you need to get APK quickly
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码