1
生成符號APK時出現此錯誤。請幫幫我。Android:生成符號APK時出現此錯誤
看到這個錯誤
Information:Gradle tasks [:app:assembleRelease] Warning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: can't find referenced method 'long getContentLengthLong()' in program class com.squareup.okhttp.internal.huc.HttpURLConnectionImpl Warning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: can't find referenced method 'long getHeaderFieldLong(java.lang.String,long)' in program class com.squareup.okhttp.internal.huc.HttpURLConnectionImpl Warning:com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpsURLConnection: can't find referenced method 'long getContentLengthLong()' in program class com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpURLConnection Warning:com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpsURLConnection: can't find referenced method 'long getHeaderFieldLong(java.lang.String,long)' in program class com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpURLConnection Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced field 'com.squareup.okhttp.CacheControl FORCE_CACHE' in program class com.squareup.okhttp.CacheControl Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced method 'com.squareup.okhttp.Request$Builder cacheControl(com.squareup.okhttp.CacheControl)' in program class com.squareup.okhttp.Request$Builder Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder Warning:okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning:okio.Okio: can't find referenced class java.nio.file.Files Warning:okio.Okio: can't find referenced class java.nio.file.Path Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption Warning:okio.Okio: can't find referenced class java.nio.file.Path Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption Warning:okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning:okio.Okio: can't find referenced class java.nio.file.Path Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption Warning:okio.Okio: can't find referenced class java.nio.file.Path Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption Warning:okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning:there were 21 unresolved references to classes or interfaces. Warning:there were 6 unresolved references to program class members. 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 Information:BUILD FAILED Information:Total time: 30.672 secs Information:1 error Information:23 warnings Information:See complete output in console
在proguard中使用.... sign apk生成但不能在手機中運行 –
「sign apk生成但不能在移動設備上運行」。然後當這個錯誤被拋出。 –
警告:okio.DeflaterSink:找不到引用類org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 警告:okio.Okio:找不到引用類java.nio.file.Files 警告:okio.Okio:can找不到引用類java.nio.file.Path 警告:okio.Okio:找不到引用類java.nio.file.OpenOption 警告:okio.Okio:找不到引用類java.nio.file 。路徑 我加入-dontwarn okio。**在proguard中,所有的警告和錯誤都將消失,並且還會生成簽名apk,但不會在移動設備上運行...只需打開應用程序並關閉而不會崩潰。 –