0
生成已簽名的apk時,出現504錯誤並顯示以下輸出。 請讓我知道我做錯了什麼。從android studio創建已簽名的apk時出錯
在此先感謝...
Error:Execution failed for task
':app:transformClassesAndResourcesWithProguardForRelease'.
Job failed, see logs for details
Information:BUILD FAILED
Information:Total time: 1 mins 7.38 secs
Information:1 error
Information:1,097 warnings
Information:See complete output in console
Proguard的是 -
-keep class com.facebook.** { *;}
-keepattributes Signature
-keep class com.bumptech.glide.integration.okhttp3.OkHttpGlideModule
添加依賴關係 -
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
compile 'net.sourceforge.jexcelapi:jxl:2.6.12'
compile 'com.facebook.android:facebook-android-sdk:4.18.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.github.barteksc:android-pdf-viewer:2.4.0'
provided 'org.androidannotations:androidannotations:4.0.0'
compile 'org.androidannotations:androidannotations-api:4.0.0'
}
apply plugin: 'com.google.gms.google-services'
謝謝。我贊同你。但是當我做'minifyEnabled false'時,它會成功建立。可能是縮小錯誤。 –
是的一些依賴關係不能簡單。 – vishal
你可以使用proguard-android.txt文件 – vishal