07-24 10:54:13.529: E/AndroidRuntime(12130): FATAL EXCEPTION: AsyncTask #3
07-24 10:54:13.529: E/AndroidRuntime(12130): java.lang.RuntimeException: An error occured while executing doInBackground()07-24 10:54:13.529: E/AndroidRuntime(12130): at android.os.AsyncTask$3.done(AsyncTask.java:299)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.FutureTask.run(FutureTask.java:137)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.lang.Thread.run(Thread.java:856)07-24 10:54:13.529: E/AndroidRuntime(12130): Caused by: java.lang.AssertionError: illegal type variable reference07-24 10:54:13.529: E/AndroidRuntime(12130): at org.apache.harmony.luni.lang.reflect.ImplForVariable.resolve(ImplForVariable.java:113)07-24 10:54:13.529: E/AndroidRuntime(12130): at org.apache.harmony.luni.lang.reflect.ImplForVariable.getGenericDeclaration(ImplForVariable.java:127)07-24 10:54:13.529: E/AndroidRuntime(12130): at org.apache.harmony.luni.lang.reflect.ImplForVariable.hashCode(ImplForVariable.java:46)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.Arrays.hashCode(Arrays.java:1260)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl.hashCode(SourceFile:475)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.google.gson.reflect.TypeToken.(SourceFile:64)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.gaozhi.wh.asynctask.MyAsyncTask$2$1.(SourceFile:78)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.gaozhi.wh.asynctask.MyAsyncTask$2.call(SourceFile:78)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.gaozhi.wh.asynctask.MyAsyncTask$2.call(SourceFile:1)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.gaozhi.wh.utils.async.AsyncTaskUtils$2.doInBackground(SourceFile:114)07-24 10:54:13.529: E/AndroidRuntime(12130): at com.gaozhi.wh.utils.async.AsyncTaskUtils$2.doInBackground(SourceFile:1)07-24 10:54:13.529: E/AndroidRuntime(12130): at android.os.AsyncTask$2.call(AsyncTask.java:287)07-24 10:54:13.529: E/AndroidRuntime(12130): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) 07-24 10:54:13.529: E/AndroidRuntime(12130): ... 4 more
The error log is similar to a foreign friend. It has encountered this problem after obfuscation of proguard. This problem has been plagued for a long time, because many obfuscation issues have been found before, but the cause has not been found, finally, there is a solution.
You may need to add
-keepattributes EnclosingMethod
I was so excited with a useful answer. I tried it and it was okay .... Sahua ~~~ This sentence should be to protect internal classes ~~~
Finally, based on this clue, we found that we should add-keepattributes exceptions, innerclasses, signature, deprecated,
All the functions of sourcefile, linenumbertable, * annotation *, and enclosingmethod! This obfuscation should be okay.