致命异常:java.lang.NullPointerException 在com.x.c.l.d(ProGuard:713) 在com.x.c.e.c(ProGuard:161) 在com.x.b.a.a(ProGuard:41) 在com.x.b.a $ 1.run(ProGuard:646) 在com.x.c.o $ 1.run(ProGuard:110) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:569) 在java.lang.Thread.run(Thread.java:856)
我正在使用eclipse,这是我的project.properties文件。
#This project.properties file is being managed by Fabric.
#Manifest merger has been enabled to pull in kit resources.
#Fri Jun 10 14:46:12 IST 2016
manifestmerger.enabled=true
android.library.reference.3=..\\ScratchViewLibrary
target=android-19
android.library.reference.2=..\\simple-crop-image-lib
android.library.reference.1=..\\facebook
android.library.reference.4=..\\kit-libs\\io-fabric-sdk-android_fabric
android.library.reference.5=..\\kit-libs\\com-crashlytics-sdk-android_crashlytics-core
android.library.reference.6=..\\kit-libs\\com-crashlytics-sdk-android_crashlytics
android.library.reference.7=../google-play-services_lib
为什么会出现这个问题?以及如何解决这个问题?
答案 0 :(得分:2)
此问题与应用中的代码级别或proguard设置无关。很多应用都面临着这个问题 https://code.google.com/p/android/issues/detail?id=220567
答案 1 :(得分:0)
使用proguard-rules.pro并添加此
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-printmapping mapping.txt
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}
答案 2 :(得分:0)
尝试在minifyEnabled false
文件中设置gradle
,如果您未使用proguard
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'