Robin Henniges Student Website

Fixing java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable





If you got a NoClassDefFoundError and the Class com.google.android.gms.R is not present in the "gen" folder than i might have a solution for you.

First of all you have to Import the google play services lib.

Import -> Existing Android Code Into Workspace.


Select the google-play-services-lib and finish the dialog. The Project should now appear in the Package Explorer.

Now go to your Project with the NoClassDefFoundError and rightclick on the Project. Than Click Properties.

 


In the Properties Window click on Android.

Click on "Add..." , select "google-play-services_lib" and press ok.

It should look like this (Android version doesn't matter)

Finally your Project hopefully looks like this: