不知道为什么我在生成签名的apk时遇到此错误。 unsigned 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:2.0@aar'
compile 'com.daimajia.androidanimations:library:2.2@aar'
compile 'com.github.john990:WaveView:v0.9'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
testCompile 'junit:junit:4.12'
}
我正在获得gradle build
时出错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
中没有添加任何代码答案 0 :(得分:2)
将此行放在proguard-rules.pro文件中。
-dontwarn org.slf4j。**
-dontwarn javax.xml。**
-dontwarn org.apache。**