I am working on a project in which I want to show a map, for which I want to add google-play-service-lib , but when I add it, my R.java files are deleted and not restored.
I tried adding google-play-service-lib to the build path. After adding everything goes fine. But when I run the project, it gives an error message: java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
And when I add it to the project, R.java is deleted. I tried the number of permutations and combinations that I found on google and SO . But there is no acceptable solution that solves my problem.
Please help me with this .. !!
EDIT
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <fragment android:id="@+id/map_gle" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment"/> </RelativeLayout>
source share