Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error - The import com.google can not be resolved

Tags:

android

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.

like image 283
saran Avatar asked Mar 29 '10 05:03

saran


2 Answers

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.

like image 95
Jim Blackler Avatar answered Oct 26 '22 08:10

Jim Blackler


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.

like image 39
Nipun Avatar answered Oct 26 '22 07:10

Nipun