Skip to content Skip to sidebar Skip to footer

Trouble Importing Android-support-v4.jar

I am trying to do the tutorial Sample Code from the https://developers.google.com/maps/documentation/android/intro page.I import the google-play-services_lib just fine, then I impo

Solution 1:

OK, first of all, know that Eclipse messes up with resources and R.java file many times.

Now,add the android.support.v4 as stated in the tutorials, you'll get your 100+ errors of R cannot be resolved. Now see if import android.R or import package_name.classname.R statement is present anywhere? Please delete these all

Now take a backup of the project somewhere, delete the project and make a new one. Now, copy the folders -- lib/libs, src, res, and Androidmanifest.xml from the backup to the new project folder (replace them). Now refresh the project in eclipse. It should work!

Solution 2:

Try three things

Right click on the map project and under android tools select add support library.

if still not resolved

Select project properties and check android private libraries and android support v4 under the order and export tab

if still not resolved

In the class which is giving error remove the import statement for the R.java file and press ctrl+shift+O then select and import the R file with project name

Post a Comment for "Trouble Importing Android-support-v4.jar"