我正在使用 dexguard 来混淆我的应用程序,但是当我这样做时,我在运行应用程序时会崩溃。下面是堆栈跟踪。
04-08 17:46:11.786: E/AndroidRuntime(7569): java.lang.RuntimeException: An error occured while executing doInBackground()
04-08 17:46:11.786: E/AndroidRuntime(7569): at android.os.AsyncTask$3.done(AsyncTask.java:299)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
04-08 17:46:11.786: E/AndroidRuntime(7569): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.lang.Thread.run(Thread.java:841)
04-08 17:46:11.786: E/AndroidRuntime(7569): Caused by: java.lang.NoSuchFieldError: ˈ
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.lang.Class.getDeclaredAnnotation(Native Method)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.lang.Class.getAnnotation(Class.java:243)
04-08 17:46:11.786: E/AndroidRuntime(7569): at o.hS.ˊ(:124)
04-08 17:46:11.786: E/AndroidRuntime(7569): at o.ȑ.ˊ(:113)
04-08 17:46:11.786: E/AndroidRuntime(7569): at o.ڋ.doInBackground(:42)
04-08 17:46:11.786: E/AndroidRuntime(7569): at android.os.AsyncTask$2.call(AsyncTask.java:287)
04-08 17:46:11.786: E/AndroidRuntime(7569): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
04-08 17:46:11.786: E/AndroidRuntime(7569): ... 4 more
这是我从 ACRA lib init 方法中得到的,因为我们有 getAnnotation 方法。我用过-keepattributes *Annotation*
并且-keep class org.acra.ACRA {*;}
但没有任何运气...
有人知道吗?
谢谢,
吉姆。