无法生成签名的APK

无法生成签名的APK

本文介绍了无法生成签名的APK-TaskExecutionException失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正处于使我的应用程序正常运行的最后一步,当我尝试build并生成签名的apk时,我从ProGuard

I'm in the final steps of making my app live, when I try build and generate signed apk I get this error log from ProGuard

这是我的保镖

-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 *;
}

构建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'

推荐答案

只需将-ignorewarnings添加到proguard中就对我有用.请注意,不建议使用这种方法,您应该修复警告,但是如果您需要快速获取apk会有所帮助.

Just by adding -ignorewarnings into the proguard did work for me. Take care that this approach is not suggested, you should fix the warnings, but this will help if you need to get your apk quick.

这篇关于无法生成签名的APK-TaskExecutionException失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 11:26