Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Google map v2 with library project
    text
    copied!<p>I have Google map v2 setup in an Android library project. There are two apps built on top of the library project. For shorter writing, I'll use these connotations to reference the various projects. <strong>Project A</strong> - The Android library project, <strong>Project B</strong> - Built on top of the Android library project - <strong>Project C</strong> - Also built on top of the Android library project.</p> <p><strong>Project B</strong> share the same package name as <strong>Project A</strong>. <strong>Project C</strong> has a different package name. In <strong>Project A</strong> maps have been embedded in different parts of the application. </p> <p>With <strong>Project B</strong> the maps load in all the areas of the application the map has been embedded without a problem, however, with <strong>Project C</strong> the map only loads in one part of the application, the other parts, either it's a grey grid or a black view.</p> <p>Here are the relevant parts of the manifest file that setups Google maps v2 Android.</p> <p><strong>Project B</strong> manifest </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.projectb.app" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt; &lt;permission android:name="com.projectb.app.permission.MAPS_RECEIVE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.projectb.app.permission.MAPS_RECEIVE" /&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;application android:name="com.projectb.app.App" android:hardwareAccelerated="true" android:icon="@drawable/app_icon" android:label="@string/app_title" android:theme="@style/Theme" &gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/google_map_api_key" /&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p><strong>Project C</strong> manifest </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.projectc.app" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt; &lt;permission android:name="com.projectc.app.permission.MAPS_RECEIVE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.projectc.app.permission.MAPS_RECEIVE" /&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;application android:name="com.projectc.app.App" android:hardwareAccelerated="true" android:icon="@drawable/app_icon" android:label="@string/app_title" android:theme="@style/Theme" &gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/google_map_api_key" /&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>I used the different package names to setup their respective map API keys.</p> <p>Is this a bug with Google maps v2 Android or I'm doing something wrong with the map API key setup. </p>
 

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