Android Fragments On Lower Api
Solution 1:
You are still using the android.view.fragment
class, which does not exist. You have to switch to android.support.v4.app.fragment
on older devices.
Solution 2:
If you are using a lower API because of the minSdkVersion, you should know that you can use the latest sdk and set the minSdkVersion to a lower value. They have not to be the same.
Solution 3:
Actually, this issue is from ADT tools.
re-order the "Order and Export" in Java Build Path by src > gen > Private > other...
Add Support Library >> android-support-v4.jar
Solution 4:
OK so I had the same issue, and finally got it working. First of all make sure you have the latest ADT tools.
1)Go into every activity that uses fragments and have them extend from FragmentActivity
instead of Activity
2)if you haven't imported the support library into your build, then right-click on your project->Android Tools->Add Support Library
3)make sure in your xml the tags are <fragment />
and not <android.support.v4.app.fragment />
hope that helps you out, took me a while to get it working.
Post a Comment for "Android Fragments On Lower Api"