I want to run a google +: PlusSampleActivity sample.
The steps for this are defined here: https://developers.google.com/+/mobile/android/getting-started
The project has no compile-time errors.
But if I run the application, I get an exception:
FATAL EXCEPTION: main java.lang.ExceptionInInitializerError at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1409) at android.app.Instrumentation.newActivity(Instrumentation.java:1021) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675) at android.app.ActivityThread.access$1500(ActivityThread.java:121) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3701) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NoClassDefFoundError:
I donβt know what is wrong when I tried to run a simpler application. Step 3 Initialize PlusClient, a similar exception:
Caused by: java.lang.NoClassDefFoundError: com.example.ExampleActivity...
Of course, I added access to the application by adding a new client identifier.
Link added to library correctly
I solved my problem:
Right-click the project, select Android Tools β Add Support Library
A source on how to do this.
user1861240
source share