Keep in mind that you can get those errors if an exception is thrown in the class's static initializer. Eg, if you say:
static ClassX x = new ClassX(); and the ClassX() constructor throws an exception, the current class will fail to initialize and it can report (in some cases) as a "NotFound" error. (It can report as any of 5-6 different errors depending on the phase of the moon.) On Sep 6, 6:28 am, Tauno Talimaa <tau...@gmail.com> wrote: > Hi all, > > I'm seeing some strange crash reports in Android Market and I can't > really tell how this could be caused by our application. The reason is > always ClassNotFoundException or NoClassDefFoundError. > The exact traces come in various flavors and they have happened for a > total of ~100 times - here's one (reported 37 times): > > java.lang.RuntimeException: Unable to instantiate application > com.company.product.MyApplication: java.lang.ClassNotFoundException: > com.company.product.MyApplication in loader > dalvik.system.PathClassLoader[/data/app-private/com.company.product-1.apk] > at > android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:649) > at > android.app.ActivityThread.handleBindApplication(ActivityThread.java:4232) > at android.app.ActivityThread.access$3000(ActivityThread.java:125) > at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071) > at android.os.Handler.dispatchMessage(Handler.java:99) > at android.os.Looper.loop(Looper.java:123) > at android.app.ActivityThread.main(ActivityThread.java:4627) > at java.lang.reflect.Method.invokeNative(Native Method) > at java.lang.reflect.Method.invoke(Method.java:521) > at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) > at dalvik.system.NativeStart.main(Native Method) > Caused by: java.lang.ClassNotFoundException: > com.company.product.MyApplication in loader > dalvik.system.PathClassLoader[/data/app-private/com.company.product-1.apk] > at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) > at java.lang.ClassLoader.loadClass(ClassLoader.java:573) > at java.lang.ClassLoader.loadClass(ClassLoader.java:532) > at android.app.Instrumentation.newApplication(Instrumentation.java:942) > at > android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644) > ... 11 more > > We've tested the same .apk on a number of devices and we've never > encountered issues like this - what could cause such issues in the first > place - custom ROMs / broken devices / something that we're doing wrong? :/ > > Tauno -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en