Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle MapFragment is blank (white) with Could not find class 'maps.j.k'
    primarykey
    data
    text
    <p>I'm trying to build the official <a href="http://developer.android.com/google/play-services/maps.html" rel="noreferrer">android google map api v2</a> sample on a (gingerbread 2.3.5) phone . I added <code>android-support-v4.jar</code> to official sample project.</p> <p>I took the sample from the official tutorial in <code>&lt;android-sdk&gt;/extras/google-play-services/samples/maps</code> </p> <p>I copied the sample app in Eclipse, reference the <code>google-play-services_lib</code> project as an Android library, and build the whole thing with the Android SDK 4.1.2 (api 16).</p> <p>Unfortunately, ahen I launch the app the map is blank and I don't have any exception or message. The only thing I got are those suspicious lines in the logcat : </p> <pre><code> Unable to resolve superclass of Lmaps/a/du; (411) Link of class 'Lmaps/a/du;' failed Unable to resolve superclass of Lmaps/a/ej; (2363) Link of class 'Lmaps/a/ej;' failed Unable to resolve superclass of Lmaps/j/k; (2379) Link of class 'Lmaps/j/k;' failed </code></pre> <p>ERR Could not find class 'maps.j.k', referenced from method maps.y.ae.a<br> VFY: unable to resolve new-instance 3571 (Lmaps/j/k;) in Lmaps/y/ae; </p> <p>I suspect that my project structure in eclipse 3.8 is somewhat messed up.</p> <p>I tried the following things (even the most idiotic) to no avail.</p> <h2>1. Invalid api key ?</h2> <p>I generated a "debug.keystore" with keytool and updated the eclipse preference (Android/Build/Keystore). Of course, I registered that new keystore/SHA1 and get a new api key that I used in the AndroidManifest file</p> <h2>2. Wrong project target ?</h2> <p>I tried to build my two projects with the following targets : </p> <ul> <li>Android 4.2.1</li> <li>Google Api 4.2.1</li> </ul> <h2>3. adding google-play-services_lib as a project dependency</h2> <p>I tried to add google-play-services_lib as a project dependency on top of being added as an android library in the demo build path. And tick the matching export checkbox. </p> <h2>4. test google maps api v2 on the phone</h2> <p>I downloaded <a href="https://play.google.com/store/apps/details?id=com.trulia.android" rel="noreferrer">trulia real estate</a> app that is said to use the v2 api on the phone to be sure that the phone is compatible with the new api </p> <p>Here is the manifest for the sample app </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.mapdemo" android:versionCode="1" android:versionName="1.0" &gt; &lt;permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" /&gt; &lt;!-- Copied from Google Maps Library/AndroidManifest.xml. --&gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt; &lt;!-- External storage for caching. --&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;!-- My Location --&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; &lt;!-- Maps API needs OpenGL ES 2.0. --&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;!-- End of copy. --&gt; &lt;application android:hardwareAccelerated="true" android:icon="@drawable/ic_launcher" android:label="@string/demo_title" &gt; &lt;!-- You must insert your own Google Maps for Android API v2 key in here. --&gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="XXXXXXXX" /&gt; &lt;activity android:name=".MainActivity" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".BasicMapActivity" android:label="@string/basic_map" /&gt; &lt;activity android:name=".CameraDemoActivity" android:label="@string/camera_demo" /&gt; &lt;activity android:name=".EventsDemoActivity" android:label="@string/events_demo" /&gt; &lt;activity android:name=".GroundOverlayDemoActivity" android:label="@string/groundoverlay_demo" /&gt; &lt;activity android:name=".LayersDemoActivity" android:label="@string/layers_demo" /&gt; &lt;activity android:name=".LocationSourceDemoActivity" android:label="@string/locationsource_demo" /&gt; &lt;activity android:name=".MarkerDemoActivity" android:label="@string/marker_demo" /&gt; &lt;activity android:name=".OptionsDemoActivity" android:label="@string/options_demo" /&gt; &lt;activity android:name=".PolygonDemoActivity" android:label="@string/polygon_demo" /&gt; &lt;activity android:name=".PolylineDemoActivity" android:label="@string/polyline_demo" /&gt; &lt;activity android:name=".ProgrammaticDemoActivity" android:label="@string/programmatic_demo" /&gt; &lt;activity android:name=".TileOverlayDemoActivity" android:label="@string/tile_overlay_demo" /&gt; &lt;activity android:name=".UiSettingsDemoActivity" android:label="@string/uisettings_demo" /&gt; &lt;activity android:name=".RawMapViewDemoActivity" android:label="@string/raw_mapview_demo" /&gt; &lt;activity android:name=".RetainMapActivity" android:label="@string/retain_map" /&gt; &lt;activity android:name=".MultiMapDemoActivity" android:label="@string/multi_map_demo" /&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Here are some screenshots of my project structure/build path.</p> <p><img src="https://i.stack.imgur.com/jitf8.png" alt="Project structure"></p> <p><img src="https://i.stack.imgur.com/MGhD8.png" alt="Target and libraries"></p> <p><img src="https://i.stack.imgur.com/lv3jr.png" alt="Build path"></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