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.