Could it be that the class loader is failing to find the right package? I just saw that you are using 'com.company.app' as your package name. Googling a bit I found that there are many apps that use the same schema. Normally I use my domain to identify my packages in a unique way like 'com.myweb.myapp'.
I just tried to reproduce your error and creating 2 apps that use the same base package name I just get the error when launching them. I think that the class loader will pickup the first listed package and then try to load the class (which is not there :P): - com.package.app.ActivityA - com.package.app.ActivityB If I load com.package.app.ActivityB I'm getting the same error. Hope this can help you a bit. Cheers, Moss On Nov 23, 5:58 pm, Emanuel Moecklin <[email protected]> wrote: > Tauno Talimaa <tauntz <at> gmail.com> writes: > > > > > 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 > > Hi Tauno > > I'm getting the same error reports in my developer console: > > java.lang.RuntimeException: Unable to instantiate activity > ComponentInfo{com.company.app/com.company.app.InitializeActivity}: > java.lang.ClassNotFoundException: com.company.app.InitializeActivity in loader > dalvik.system.PathClassLoader[/mnt/asec/com.company.app-1/pkg.apk] > at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585) > at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) > at android.app.ActivityThread.access$2300(ActivityThread.java:125) > at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) > 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:876) > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634) > at dalvik.system.NativeStart.main(Native Method) > Caused by: java.lang.ClassNotFoundException: > com.company.app.InitializeActivity > in loader dalvik.system.PathClassLoader[/mnt/asec/com.company.app-1/pkg.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.newActivity(Instrumentation.java:1021) > at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577) > ... 11 more > > This one has been reported ~20 times. I'm not using any static initializers, > don't use code that is non-compliant with Android 1.5 (app is tested on 1.5 > devices) and I already spent quite some time to fix this but without success > so > far. If you have a solution by now I'd very much appreciate if you could let > me > know. > > Emanuel -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

