eclipse - Trying to use the Google Maps demo code for Android, import FragmentActivity cannot be resolved -
i'm following tutorial here. using adt bundle (i cleaned out , re-downloaded since encountering problem). used sdk manager install google play services. using sdk version 19 , platform version 4.4.2
i copied "google-play-services_lib" successfully, got 2 "unable resolve target 'android-9'" messages.
i created maps demo project , got "unable resolve target 'android-16' (this confused me quite bit, couldn't find place version 16 mentioned, either 19, 17, or 9) ton of unresolved imports. looking @ android tab of properties, saw reference had red x next (it referenced ..\..\libproject\google-play-serviced_lib instead of ../google-play-services_lib). updated reference, getting rid of every unresolved import.
at point still getting "the import android.support.v4.app.fragmentactivity cannot resolved" in file "savestatedemoactivity.java" (as few other errors stemming problem). i'm not sure problem is, , there no mention of of in tutorial. this related question, seems different situation. i'm having difficult time understanding best response.
this related question, seems different situation.
this answer problem. fragmentactivity
(a subclass of activity
) class of support library
. library made developers manage application compatibility older devices.
fragment
introduced in api 11 (android 3.0 honeycomb)
.
so if want make app run on older devices (api < 11)
have add library project in order use fragmentactivity
class.
Comments
Post a Comment