"MapFragment cannot be resolved to a type" even though I am on API level 17
To use MapFragment
, you need the Android library project attached to your app (as you had) and the import
statement for com.google.android.gms.maps.MapFragment
. Based on your comments, the latter part was the issue.
Usually, Eclipse suggest to import it by itself, so I never thought of doing it manually.
I have run into that problem on occasion as well, where -- steadfastly refuses to add an import. I have not been able to come up with a reproducible scenario, and it happens infrequently enough that I just shrug, add it manually, and move along to other things. I'm also uncertain whether the problem is with Eclipse or with any ADT extensions to the import resolver.
Besides, I went without Eclipse for a long time in Android development, typing in import
statements manually, and so I'm kinda used to it.
Btw, you answer a lot of questions here on SO, do you have time for anything else? ;-)
I am a fast typist, courtesy of several years as a teenager typing on a manual typewriter.
(For you young'uns reading this, a "typewriter" was basically a keyboard directly connected to a printer, and a "manual typewriter" was one that use the mechanical action of pressing the keys to actually put the letters on the paper, and therefore worked without electricity. Also, you are cordially invited to get off my lawn.)