0

I have searched all over for a solution and have found nothing. I deployed my app to my phone and was using it for a few days without any issues. All of a sudden out the blue, the launch of a particular activity started to cause the app to force close even though previously it loaded just fine.

I then ran the app from Eclipse to my phone so that I can see the errors:

07-12 10:53:11.309: W/dalvikvm(24295): VFY: unable to find class referenced in signature (Landroid/widget/AdapterView;)
07-12 10:53:11.309: W/dalvikvm(24295): VFY: unable to find class referenced in signature (Landroid/widget/AdapterView;)
07-12 10:53:11.529: W/dalvikvm(24295): threadid=1: thread exiting with uncaught exception (group=0x41370360)
07-12 10:53:11.529: E/AndroidRuntime(24295): FATAL EXCEPTION: main
07-12 10:53:11.529: E/AndroidRuntime(24295): java.lang.NoClassDefFoundError: [generic]
07-12 10:53:11.529: E/AndroidRuntime(24295):    at dalvik.system.NativeStart.main(Native Method)

I think it has to do with setting the onItemSelected listener for a Spinner. If I comment out yearSpinner.setOnItemSelectedListener(this); there are no issues.

Here are the 2 methods that are implemented. I have left them as stubs to narrow down the issue.

@Override
    public void onItemSelected(AdapterView<?> parent, View view, int position,
            long id) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onNothingSelected(AdapterView<?> parent) {
        // TODO Auto-generated method stub

    }

Also, everything is checked in the build path.

How can I fix this issue?

Update: This resolved itself after I restarted my phone. I am not sure how to prevent this from happening again.

tnsingle
  • 139
  • 1
  • 11

1 Answers1

0

Actually I don't know what problem you have got, have you tried to clean your project if you sure that no changed you have did? but your problem quite similar with these links : java.lang.NoClassDefFoundError: [generic] at dalvik.system.NativeStart.main(Native Method) java.lang.NoClassDefFoundError on android

hope will fix your problem

Community
  • 1
  • 1
Adiyat Mubarak
  • 9,403
  • 4
  • 33
  • 47
  • It's driving me crazy. I've looked at those links, but still haven't found a solution. I have also cleaned the solution many times. – tnsingle Jul 12 '14 at 16:28