Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps Android API v2 crashes with NoClassDefFound Error
    text
    copied!<p>I am trying to implement the most basic example of google maps android api v2 example. But it crashes with the error:java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable.</p> <p>I have set up the google api and have looked at stackoverflow posts like:</p> <ul> <li>-<a href="https://stackoverflow.com/questions/14252879/google-maps-android-api-v2-tutorials">https://stackoverflow.com/questions/14252879/google-maps-android-api-v2-tutorials</a>,</li> <li>-<a href="https://stackoverflow.com/questions/14230808/google-map-android-api-v2-crashed">Google map android API V2 crashed</a> and</li> <li>-<a href="https://stackoverflow.com/questions/13796822/google-map-android-api-v2-application-crashes.">https://stackoverflow.com/questions/13796822/google-map-android-api-v2-application-crashes</a></li> </ul> <p>but their problems are slightly different than mine.</p> <p>Can you please point me to the right direction? I am using android 2.2 and would like to use the new Maps to make use of fragments in my app; so that I can get some functionality like apple's uinavigation to push new views in a pop up activity.</p> <h1>Thanks.</h1> <p>Thank you,how did you get to the png you are showing in the attachment?The google play service is shown as a referenced library in my package explorer; I did add it; this is my logcat:</p> <pre><code>01-16 06:23:55.087: E/AndroidRuntime(305): FATAL EXCEPTION: main 01-16 06:23:55.087: E/AndroidRuntime(305): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable 01-16 06:23:55.087: E/AndroidRuntime(305): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source) 01-16 06:23:55.087: E/AndroidRuntime(305): at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:271) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:558) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.view.LayoutInflater.inflate(LayoutInflater.java:407) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 01-16 06:23:55.087: E/AndroidRuntime(305): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.Activity.setContentView(Activity.java:1647) 01-16 06:23:55.087: E/AndroidRuntime(305): at com.example.afis.MainActivity.onCreate(MainActivity.java:13) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.os.Handler.dispatchMessage(Handler.java:99) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.os.Looper.loop(Looper.java:123) 01-16 06:23:55.087: E/AndroidRuntime(305): at android.app.ActivityThread.main(ActivityThread.java:4627) 01-16 06:23:55.087: E/AndroidRuntime(305): at java.lang.reflect.Method.invokeNative(Native Method) 01-16 06:23:55.087: E/AndroidRuntime(305): at java.lang.reflect.Method.invoke(Method.java:521) 01-16 06:23:55.087: E/AndroidRuntime(305): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 01-16 06:23:55.087: E/AndroidRuntime(305): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 01-16 06:23:55.087: E/AndroidRuntime(305): at dalvik.system.NativeStart.main(Native Method) 01-16 06:23:55.097: W/ActivityManager(59): Force finishing activity com.example.afis/.MainActivity 01-16 06:23:55.607: W/ActivityManager(59): Activity pause timeout for HistoryRecord{44ee9110 com.example.afis/.MainActivity} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload