在我的应用程序上成功使用ProGuard后,它会在我的移动设备上启动时崩溃。
我使用proguard的标准配置:${sdk.dir}/tools/proguard/proguard-android.txt
logcat说的是这样的:E/AndroidRuntime(13441): at packagename.q.doInBackground(Unknown Source)
然后一些App崩溃了等等。
为什么在doInBackground中找不到我的Source?它是一个简单的AsyncTask。 任何人都可以帮助我吗?
编辑:整个日志:
I/ActivityManager( 1604): Start proc myPackageName for activity myPackageName/.MainActivity: pid=13961 uid=10147 gids={3003}
I/ActivityManager( 1604): Displayed myPackageName/.MainActivity: +744ms (total +1m41s749ms)
E/AndroidRuntime(13961): at myPackageName.q.doInBackground(Unknown Source)
E/EmbeddedLogger( 1604): App crashed! Process: myPackageName
E/EmbeddedLogger( 1604): App crashed! Package: myPackageName v4 (1.2.1)
E/EmbeddedLogger( 1604): Application Label: XxX
W/ActivityManager( 1604): Force finishing activity myPackageName/.MainActivity
E/WindowManager(13961): Activity myPackageName.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40dcbed8 that was originally added here
E/WindowManager(13961): android.view.WindowLeaked: Activity myPackageName.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40dcbed8 that was originally added here
E/WindowManager(13961): at myPackageName.MainActivity.b(Unknown Source)
E/WindowManager(13961): at myPackageName.l.a(Unknown Source)
I/ActivityManager( 1604): Process myPackageName (pid 13961) has died.
答案 0 :(得分:3)
我解决了。问题是我在这个doInBackground
中使用了jsoup
刚刚添加
#Keep jsoup
-keep public class org.jsoup.** {
public *;
}
配置并且运行良好,感谢您的所有帮助