1

I made the following steps on my project and on the appcompat_v7 library: right click > Android Tools > Add Support Library..

After that everything gone crazy.. I can't import the android.app.FragmentActivity library. Here is my java build path: enter image description here

And the Android tab: enter image description here

Adding the android-support-v4.jar didn't help. Please help me!

Community
  • 1
  • 1
dephinera
  • 3,703
  • 11
  • 41
  • 75

2 Answers2

2

There is no android.app.FragmentActivity. It is android.support.v4.app.FragmentActivity.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • It was working before I did the steps I mentioned. If I use the android.support.v4.app.FragmentActivity i got ClassNotFoundException – dephinera Jul 24 '14 at 12:19
  • 2
    @Crash-ID: "It was working before I did the steps I mentioned" -- since there is no class named `android.app.FragmentActivity` in the Android SDK or support libraries, I do not see how it could have worked. – CommonsWare Jul 24 '14 at 12:26
  • @Crash-ID: Since you have provided no code and no stack trace, I cannot help you further. – CommonsWare Jul 24 '14 at 12:28
2

Fixed by changing android.app.FragmentActivity to android.support.v4.app.FragmentActivity and after that I did the steps from this answer.

Community
  • 1
  • 1
dephinera
  • 3,703
  • 11
  • 41
  • 75
  • In case of getting this error after following this step: "The import android.support cannot be resolved" [This post](http://stackoverflow.com/questions/18299898/the-import-android-support-cannot-be-resolved) is a good solution – Soph Nov 20 '14 at 18:22