I'm developing a game for Android using Libgdx. A few weeks ago I started implementing some services from the Google Play Services for games. I followed this guide
and I was able to implement that services successfully.
Yesterday I opened the SDK and I decided to upload the Google Play Services package (because there was an error with AdMob) and that was the biggest errore I ever made.
I don't now what happened; initially the main error was about the AndroidManifest of the google-play-services-lib that was targeting a sdk that wasn't installed yet. I decided to install that sdk version (api 9 ...(obsolete) by the way) but now my application crashes when it starts.
I tried to reset all the stuff and repeat the steps of the guide I linked above but it doesn't work anyway.
This is the locat of the application when it starts:
12-09 09:29:41.681: I/art(20196): Late-enabling -Xcheck:jni
12-09 09:29:41.862: I/Adreno-EGL(20196): <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
12-09 09:29:41.966: D/AndroidRuntime(20196): Shutting down VM
12-09 09:29:41.966: D/AndroidRuntime(20196): --------- beginning of crash
12-09 09:29:41.967: E/AndroidRuntime(20196): FATAL EXCEPTION: main
12-09 09:29:41.967: E/AndroidRuntime(20196): Process: com.gamestudio.gameapp.android, PID: 20196
12-09 09:29:41.967: E/AndroidRuntime(20196): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gamestudio.gameapp.android/com.gamestudio.gameapp.android.AndroidLauncher}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.example.games.basegameutils.GameHelper.onStart(android.app.Activity)' on a null object reference
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.ActivityThread.-wrap11(ActivityThread.java)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.os.Handler.dispatchMessage(Handler.java:102)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.os.Looper.loop(Looper.java:148)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.ActivityThread.main(ActivityThread.java:5417)
12-09 09:29:41.967: E/AndroidRuntime(20196): at java.lang.reflect.Method.invoke(Native Method)
12-09 09:29:41.967: E/AndroidRuntime(20196): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
12-09 09:29:41.967: E/AndroidRuntime(20196): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-09 09:29:41.967: E/AndroidRuntime(20196): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.example.games.basegameutils.GameHelper.onStart(android.app.Activity)' on a null object reference
12-09 09:29:41.967: E/AndroidRuntime(20196): at com.gamestudio.gameapp.android.AndroidLauncher.onStart(AndroidLauncher.java:101)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.Activity.performStart(Activity.java:6253)
12-09 09:29:41.967: E/AndroidRuntime(20196): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
12-09 09:29:41.967: E/AndroidRuntime(20196): ... 9 more
I believe that the problem is related with the libgdx project that has been compromised. For example the R class is not correctly compiled because some of the values of my project are no longer visible from R.
Thanks for your help.
Luca
**UPDATED QUESTION **
I'm using eclipse