Android 9 asynctask中的java.lang.NoClassDefFoundError

时间:2018-10-15 13:06:37

标签: android android-asynctask noclassdeffounderror android-9.0-pie

我刚刚在Play商店中发布了我们应用的新版本,突然发现了很多java.lang.NoClassDefFoundError异常。它们似乎仅适用于Android9。这是堆栈跟踪..有什么想法吗?

我似乎无法在调试器中复制它。

java.lang.RuntimeException: 
  at android.os.AsyncTask$3.done (AsyncTask.java:354)
  at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:383)
  at java.util.concurrent.FutureTask.setException (FutureTask.java:252)
  at java.util.concurrent.FutureTask.run (FutureTask.java:271)
  at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:245)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: 
  at com.concept2.ergdata.Sync2.getUser (Sync2.java:304)
  at com.concept2.ergdata.Sync2.synchronize (Sync2.java:76)
  at com.concept2.ergdata.ErgData$synchronize.doInBackground (ErgData.java:2284)
  at com.concept2.ergdata.ErgData$synchronize.doInBackground (ErgData.java:2281)
  at android.os.AsyncTask$2.call (AsyncTask.java:333)
  at java.util.concurrent.FutureTask.run (FutureTask.java:266)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:169)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

1 个答案:

答案 0 :(得分:0)

Java反射在android 9中受到限制,有关更多详细信息,请检查android site