简体   繁体   中英

The import com.google.maps.android.R cannot be resolved

I'm trying to make an Android app with Google Maps feature. I have setup everything, and imported all the required libraries, etc.

But, I'm getting this annoying error, which I really don't understand what is wrong, I googled it but couldn't find any solution for this so I thought I should post here.

I'm using Android Maps Utils https://github.com/googlemaps/android-maps-utils

and I'm getting this error: The import com.google.maps.android.R cannot be resolved

This error is coming in two files of Android Maps Utils.

  1. DefaultClusterRenderer.java (Package: com.google.maps.android.clustering.view)
  2. IconGenerator.java (Package: com.google.maps.android.ui)

Any help to resolve this issue will be highly appreciated. Thanks!

adding support library will solve this problem. select your project, go to android tools and then add support library. And then your error should not show there ! :)

I had the same problem. Right click on Project/properties/javaBuildPath Projects -> add library

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM