Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - Google Maps API v2 - NoClassDefFoundError
    primarykey
    data
    text
    <p>I try to run Google Maps with Intellij IDEA 12.</p> <p>I already tried advices:</p> <ul> <li><a href="https://stackoverflow.com/questions/14004289/embedding-google-maps-android-v2-in-android/14626708#14626708">Embedding google maps android v2 in android</a></li> <li><a href="https://stackoverflow.com/questions/13696620/google-maps-android-api-v2-authorization-failure?rq=1">Google Maps Android API v2 Authorization failure</a></li> <li><a href="https://stackoverflow.com/questions/13719263/unable-instantiate-android-gms-maps-mapfragment/13744765#13744765">Unable instantiate android.gms.maps.MapFragment</a></li> <li><a href="https://stackoverflow.com/questions/3792148/google-maps-android-api-gives-a-noclassdeffounderror">Google Maps Android API gives a NoClassDefFoundError</a></li> </ul> <p>and so on. But unfortunately that doesn't work for me.</p> <p>My configuration:</p> <p>1) real device htc wildefire s, android 2.3.5</p> <p>2) <img src="https://i.stack.imgur.com/kMlNk.jpg" alt="enter image description here"></p> <p>3) <code>AndroidManifest.xml</code>:</p> <pre> &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;ru.ergeslab.TransportScheduleYaroslavl&quot; android:installLocation=&quot;auto&quot; android:versionCode=&quot;1&quot; android:versionName=&quot;1.0&quot;&gt; &lt;uses-feature android:glEsVersion=&quot;0x00020000&quot; android:required=&quot;true&quot;/&gt; &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt; &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot;/&gt; &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt; &lt;uses-permission android:name=&quot;com.google.android.providers.gsf.permission.READ_GSERVICES&quot;/&gt; &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot;/&gt; &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot;/&gt; &lt;permission android:name=&quot;ru.ergeslab.TransportScheduleYaroslavl.permission.MAPS_RECEIVE&quot; android:protectionLevel=&quot;signature&quot;/&gt; &lt;uses-permission android:name=&quot;ru.ergeslab.TransportScheduleYaroslavl.permission.MAPS_RECEIVE&quot;/&gt; &lt;uses-sdk android:minSdkVersion=&quot;10&quot; android:targetSdkVersion=&quot;16&quot; /&gt; &lt;application android:label=&quot;@string/app_name&quot;&gt; &lt;meta-data android:name=&quot;com.google.android.maps.v2.API_KEY&quot; android:value=&quot;MY_KEY&quot;/&gt; &lt;uses-library android:name=&quot;com.google.android.maps&quot; /&gt; &lt;activity android:name=&quot;MainActivity&quot; android:label=&quot;@string/app_name&quot;&gt; &lt;intent-filter&gt; &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt; &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </pre> <p>4) <code>MainActivity:</code></p> <pre><code>&lt;pre&gt; package ru.ergeslab.TransportScheduleYaroslavl; import android.os.Bundle; import android.support.v4.app.FragmentActivity; public class MainActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } </code></pre> <p></p> <p>5) <code>main.xml</code>:</p> <pre> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;fragment xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:id=&quot;@+id/map&quot; android:name=&quot;com.google.android.gms.maps.SupportMapFragment&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;match_parent&quot; /&gt; </pre> <p>6) IDE project settings: <img src="https://i.stack.imgur.com/fwMwb.png" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/G7kdg.png" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/ak4t0.png" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/N3v2k.png" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/MgyEL.png" alt="enter image description here"> </p> <p>Full Android logcat:</p> <pre> 04-02 21:27:07.718: ERROR/AndroidRuntime(24277): FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source) at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source) at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:279) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563) at android.view.LayoutInflater.inflate(LayoutInflater.java:386) at android.view.LayoutInflater.inflate(LayoutInflater.java:320) at android.view.LayoutInflater.inflate(LayoutInflater.java:276) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:250) at android.app.Activity.setContentView(Activity.java:1712) at ru.ergeslab.TransportScheduleYaroslavl.MainActivity.onCreate(MainActivity.java:13) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851) at android.app.ActivityThread.access$1500(ActivityThread.java:132) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:4277) 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:839) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) at dalvik.system.NativeStart.main(Native Method) </pre> <p>Any help is greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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