生成签名apk的错误(未签名的apk工作正常)

问题描述:

不知道为什么我在生成已签名的apk时出现此错误。 未签名的apk工作正常。生成签名apk的错误(未签名的apk工作正常)

我的项目建设gradle这个文件

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 
    defaultConfig { 
     applicationId "in.fabits.fabits" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 
repositories { 

    maven { 
     url "https://jitpack.io" 
    } 
} 


dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.2.0' 
    compile 'com.android.support:preference-v7:25.2.0' 
    compile 'com.android.support:design:25.2.0' 
    compile 'com.android.support:cardview-v7:25.2.0' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'com.android.volley:volley:1.0.0' 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' 
    compile 'com.github.clans:fab:1.6.4' 
    compile 'com.pusher:pusher-java-client:1.4.0' 
    compile 'com.firebase:firebase-jobdispatcher-with-gcm-dep:0.6.0' 
    compile 'com.android.support:support-v4:25.2.0' 
    compile 'com.android.support:support-vector-drawable:25.2.0' 
    compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0' 
    compile 'com.daimajia.easing:library:[email protected]' 
    compile 'com.daimajia.androidanimations:library:[email protected]' 
    compile 'com.github.john990:WaveView:v0.9' 
    compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2' 

    testCompile 'junit:junit:4.12' 
} 

错误,那是我得到gradle这个构建

Warning:org.slf4j.LoggerFactory: can't find referenced class org.slf4j.impl.StaticLoggerBinder 
Warning:org.slf4j.MDC: can't find referenced class org.slf4j.impl.StaticMDCBinder 
Warning:org.slf4j.MarkerFactory: can't find referenced class org.slf4j.impl.StaticMarkerBinder 
Warning:there were 11 unresolved references to classes or interfaces. 
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. 
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. 
> Job failed, see logs for details 

没有在proguard-rules.pro

将这个行添加您的代码proguard-rules.pro文件。

-dontwarn org.slf4j。**

-dontwarn javax.xml。**

-dontwarn org.apache。**

+0

你在proguard-rules.pro – codenut

+0

意思是你是对的proguard-rules.pro –

+0

你是怎么决定把这些软件包。 – codenut