ClassNotFoundException crash reports from Market

Showing 1-23 of 23 messages
ClassNotFoundException crash reports from Market Tauno T 9/6/10 4:28 AM
 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

Re: [android-developers] ClassNotFoundException crash reports from Market Marcin Orlowski 9/6/10 5:01 AM
On 6 September 2010 13:28, 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):

What your app do? Is it calling any other application for example? If so,
ensure you do try/catch around startActivity() - users' device may not
have it at all.

> java.lang.RuntimeException: Unable to instantiate application
> com.company.product.MyApplication: java.lang.ClassNotFoundException:
   ^^^^^^^^^^^^^^^^^

you shouldn't name your classes that way unless you really own company.com
domain

Re: [android-developers] ClassNotFoundException crash reports from Market Tauno T 9/6/10 7:00 AM
> What your app do? Is it calling any other application for example? If so,
> ensure you do try/catch around startActivity() - users' device may not
> have it at all.

No, I don't start any external activities.

Re: [android-developers] ClassNotFoundException crash reports from Market TreKing 9/6/10 8:04 PM
On Mon, Sep 6, 2010 at 6:28 AM, Tauno Talimaa <tau...@gmail.com> wrote:
I'm seeing some strange crash reports in Android Market and I can't really tell how this could be caused by our application.

I have a single report of "java.lang.VerifyError" for one of the Activities in my app that's declared in the manifest.
I also have one that failed to find the GeoPoint class that's in the Google Maps library.

Seems like some crazy sh*t happens on user devices.

Do you have any reasonable user messages?
Does it say what platform and and Android version? (Mine's just "Other", so useful!)

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

Re: [android-developers] ClassNotFoundException crash reports from Market Tauno T 9/7/10 12:55 AM
The user messages are not really helpful sadly :(
"closed"
"fails to install properly on my Droid Motorola" (tested it on a Droid
myself - tried Android 2.1 and 2.2 and it worked just fine)
"wont let me open"
etc..

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

Re: ClassNotFoundException crash reports from Market Pent 9/7/10 2:36 AM
> I also have one that failed to find the GeoPoint class that's in the Google
> Maps library.

Maybe that's related to one that puzzled me too.

A knowledgable user informed me that some ROMs just use a stub for the
maps package,
there isn't actually a library there.

Hence your app loads OK but crashes when you try to use map classes
apparently.

Pent
Re: [android-developers] Re: ClassNotFoundException crash reports from Market Tauno T 9/7/10 3:28 AM
yeah, that sounds reasonable for GeoPoint - but in my case I'm not
using the MapsAPIs at all - Android just can't find my Application
class for some reason :/

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] ClassNotFoundException crash reports from Market TreKing 9/7/10 8:05 AM
On Tue, Sep 7, 2010 at 2:55 AM, Tauno Talimaa <tau...@gmail.com> wrote:
The user messages are not really helpful sadly :(

Yeah, I hear you, pretty hard to get useful information from users without being able to ask them questions.
 
On Tue, Sep 7, 2010 at 4:36 AM, Pent <tas...@dinglisch.net> wrote:
A knowledgable user informed me that some ROMs just use a stub for the maps package, there isn't actually a library there.

I did have a comment for that that said "FC on Froyo ROM", so that makes more sense.

On Tue, Sep 7, 2010 at 5:28 AM, Tauno Talimaa <tau...@gmail.com> wrote:
yeah, that sounds reasonable for GeoPoint - but in my case I'm not using the MapsAPIs at all - Android just can't find my Application class for some reason :/

Yeah, that's weird. You may just have to wait until someone decides to email you about it.
Re: ClassNotFoundException crash reports from Market Yahel 9/7/10 8:42 AM
Hi all,

I had both theses errors : ClassNotFound and  VerifyError.

Turns out I was using a class and/or a function that was not available
in the 1.5 framework.

In my manifest I have :

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"></
uses-sdk>

And in my project properties I have checked the 1.6 framework.

With both of these it did not trigger compiler error since the
function existed in the 1.6 framework.
I just went in the properties, checked the 1.5 framework. Errors were
detected by the compiler, I found a way around them, then checked back
1.6 in the properties. It did the trick.

Good luck.

Yahel
Re: [android-developers] Re: ClassNotFoundException crash reports from Market Tauno T 9/7/10 9:17 AM
That can't be the problem in my case because people have reported it
on Droid but we've tested it on Droid from the day it came out till
the 2.2 update - and never seen a problem. Also there are a LOT of
Droid users of the app and it apparently happens just for <0.X% of
them :/

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: ClassNotFoundException crash reports from Market TreKing 9/7/10 9:10 AM
On Tue, Sep 7, 2010 at 10:42 AM, Yahel <kay...@gmail.com> wrote:
I had both theses errors : ClassNotFound and  VerifyError.

Turns out I was using a class and/or a function that was not available
in the 1.5 framework.

The one Activity for which the VerifyError is thrown in my bug report does not use any new APIs. I did what you suggested anyway and found no errors. Next idea? =)
Re: ClassNotFoundException crash reports from Market Irene 9/9/10 10:18 AM
I've been getting reports of ClassNotFoundException as well. I'm also
not using any of the Maps APIs and compiling against the 1.5
framework. No one knows what can cause this?

On Sep 7, 9:10 am, TreKing <treking...@gmail.com> wrote:
> On Tue, Sep 7, 2010 at 10:42 AM, Yahel <kaye...@gmail.com> wrote:
> > I had both theses errors : ClassNotFound and  VerifyError.
>
> > Turns out I was using a class and/or a function that was not available
> > in the 1.5 framework.
>
> The one Activity for which the VerifyError is thrown in my bug report does
> not use any new APIs. I did what you suggested anyway and found no errors.
> Next idea? =)
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
Re: ClassNotFoundException crash reports from Market DanH 9/10/10 6:55 PM
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.)
Re: ClassNotFoundException crash reports from Market Emanuel Moecklin 11/23/10 8:58 AM


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

Re: ClassNotFoundException crash reports from Market Moss 11/24/10 11:01 AM
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 <emanuel.moeck...@1gravity.com>
wrote:
unk...@googlegroups.com 11/25/10 6:36 PM <This message has been deleted.>
unk...@googlegroups.com 11/25/10 5:16 AM <This message has been deleted.>
unk...@googlegroups.com 11/27/10 7:08 AM <This message has been deleted.>
Re: ClassNotFoundException crash reports from Market Emanuel Moecklin 11/27/10 7:10 AM
Hi Moss

The com.package.app is just an "obfuscated" package name (much like
your "com.package.app").
In reality I'm using a unique name or that's what I hope I do ;-).

Thanks for your post anyway.
I really appreciate your support!

Cheers
Emanuel
Re: ClassNotFoundException crash reports from Market Mark 12/27/10 1:27 PM
Anyone word on this from google?

I am distributing a pretty popular app and this error has popped up a
few hundred times now in the marketplace crash report. I can't really
do anything for these users except ask them to run something like Log
Collector but it's a slim chance they'll do that (no takers yet).
Looks like something related to google maps missing or some such
thing?:

java.lang.RuntimeException: Unable to instantiate application
com.me.test.ActivityMain: java.lang.ClassNotFoundException:
com.me.test.ActivityMain in loader dalvik.system.PathClassLoader[/
system/framework/com.google.android.maps.jar:/data/app/
com.me.test-1.apk]
Caused by: java.lang.ClassNotFoundException: com.me.test.ActivityMain
in loader dalvik.system.PathClassLoader[/system/framework/
com.google.android.maps.jar:/data/app/com.me.test-1.apk]

Thanks
Re: ClassNotFoundException crash reports from Market Technical Support 12/31/10 5:30 AM
I started getting ClassNotFoundExceptions for one of the classes in my
application last night.

Oddly enough I also got a report from a user that he has a brand new
EVO and he can not install my widget.  He gets a "home screen full"
AFTER he gets the configuration screen on a blank home screen.  The
Provider for the BroadcastReceiver is the one that gets the CNFE.  He
sent me a LogCollector but there is no indication of any problem in
there.

I know I have active users using my widget quite extensively and it
has worked on every phone I could test on.  A friend of mine
downloaded and installed it last night on his EVO (purchased about 2
months ago) and it works fine for him.

Is it possible with Android v2.2 that if the user installs the
application to the sdcard there is some runtime problem?  I don't know
if that is the case with this one user.  I'm waiting for him to reply
to my last email.

Anything else anyone can think to check?  This is just bizarre.
Re: ClassNotFoundException crash reports from Market Emanuel Moecklin 1/5/11 4:28 PM
Hi there

I was finally able to "reproduce" the problem on one of my phones.
It threw the exact same exception I'm normally getting as a market
crash report. The result of my investigation: no app problem but a
problem during installation.
Basically the apk was corrupt and therefore the main activity class
could not be found. This explanation makes sense because the app
hasn't even been started yet when the exception occurs so how could it
be the app's fault? Especially considering the fact that the exact
same app/apk works fine on many identical devices out there. I'm
thinking that whatever piece of code installs the apk must be blamed
for this issue. A fresh installation of the app fixes the issue for
the user.

Emanuel Moecklin
1gravity LLC
Re: ClassNotFoundException crash reports from Market Droider 1/19/11 9:26 AM
Hi,

The problem with this is they have to keep uninstalling and re
installing the app over and over.

I reproduced this error by force remvoing my sdcard with out
unmounting it. This left all the apps on my sd card in the app draw
but with blank icons.

java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.mycompany.app/com.mycompany.app.MAINACTIVITY}:
java.lang.ClassNotFoundException: com.mycompany.app.MAINACTIVITY in
loader dalvik.system.PathClassLoader[/mnt/asec/com.mycompany.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.mycompany.app.MAINACTIVITY in loader
dalvik.system.PathClassLoader[/mnt/asec/com.mycompany.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

the game worked fine last night now it just forces closed.

Everytime I want to use this app I have to uninstall and reinstall and
start over.
More topics »