3

I am trying to start a FragmentActivity from a normal Activity, and I get this java.lang.NoClassDefFoundError in log, while the app crashes.

Should I change anything in manifest to be able to use a FragmentActivity in my app?

Has anyone else come across this error? How did you fix it?

Ron
  • 24,175
  • 8
  • 56
  • 97

3 Answers3

1

Maybe is a stupid hint. But are you sure to have inserted the FragmentActivity into your Manifest file?

If so try to insert this into manifest:

<uses-sdk
    android:minSdkVersion="4"
    android:targetSdkVersion="8" />
Oibaf it
  • 1,842
  • 16
  • 9
0

The issue is noted here: FragmentActivity causing ClassNotFoundException

Please update the sdk tools. It should solve the problem.

Community
  • 1
  • 1
user802467
  • 951
  • 2
  • 14
  • 22
  • To be more precise, this is the combination that solved the issue for me (latest software downloads on Nov 21, 2012): sdk-tools rev 21, platform-tools rev 16, support-library rev 11. I also had to add below change in the .classpath file: – user802467 Nov 22 '12 at 02:48
0

The android-support-v4 library contains a bug.

So, make a new project with android version 4.2.2. Copy the file which is android-support-v4.jar, and paste in your project.

I solve the problem this way!

Radim Köhler
  • 122,561
  • 47
  • 239
  • 335