I am new to android development. I got开发者_运维问答 an error when I wrote the code
import com.google.android.maps.MapView;
in eclipse. The error is The import com.google can not be resolved.
Please anybody give suggestion to fix this problem.
Bring up your project properties, and go to Android. Do you have an Android target selected that includes the Google APIs? Perhaps you just have a generic Android target.
As Jim said, you have to select "Google APIs" (which is Android x.x + Google APIs) instead of something like "Android 2.2" in your project's properties.
First you have to make sure you have installed Google API
Then set your project's properties in Eclipse to check off the Google APIs version of the SDK.
and Make sure you have include this library in AndroidManifest FIle
<uses-library
android:name="com.google.android.maps" />
精彩评论