Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps Not Showing On Android Device.

So my problem is that the google maps is not showing on my android device which is using 3.2 API

I've already tried to do most of not all the suggestions I found online while searching for a solution to this problem.

I do have <uses-permission android:name="android.permission.INTERNET"/> in my manifest.

I've followed the google written procedure to produce a signed key (http://developer.android.com/tools/publishing/app-signing.html#setup) and obtained said key and put it in the layout android:apiKey="0R8lbu8yQL1Wgw-13s5sUBXZXusi4mEY3EhqWWw" And still I see gray tiles instead of the map.

I know that the debug key works on AVD but not on the android device whereas the signed key is supposed to work on the device and not in the AVD.

I'm willing to try another step by step procedure to make this work and if it does I'll be forever grateful.

Please help! Thank you!

SOLUTION:

Was installing the wrong apk to device. Had to do:

adb install <your-file-name>.apk

in the console

EDIT:

Manifest File

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemaps"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>



<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">

    <uses-library android:name="com.google.android.maps" />

    <activity
        android:name=".StartActivity"
        android:label="@string/title_activity_start">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>


    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >

    </activity>


    <service
      android:name=".WorldWideMapService"
      android:process=":remote">
      <intent-filter>
        <action
          android:name="com.example.googlemaps.WorldWideMapService" />
      </intent-filter>
    </service>

</application>

like image 223
neocoolstar Avatar asked Sep 18 '12 04:09

neocoolstar


People also ask

Why is Google Maps not displaying?

Clear the app's cache & data On your Android phone or tablet, open the Settings app . Tap Apps & notifications. Follow the steps on your device to find the Maps app. After you select the app, storage & cache options should be available.

How do I get Google Maps back on my home screen?

On your Android phone or tablet, go to the widget section. Touch and hold the widget and drop it on your Home screen. At the top, choose a type of transport, like driving, transit, or walking. Enter a destination and shortcut name.


1 Answers

I want to correct you regarding application sign, and map api key.

There is no such thing, like default api key would work with avd only, not with device. Thing is, map api key is associated with Signature KeyStore, by which application being signed, so If you are signing application with Default Key, then you should use default api key. However If you are signing application with your own keystore you should register new keystore to google map api, and get an api key. To upload on Google play we need application is to be signed with some other keystore than default keystore, so there we need to get an release map api key.

In your case, I think, you are signing your app with default keystore, whereas, using map api key of different store.

and yes, Problem might be as @Raju mentioned.

like image 168
jeet Avatar answered Oct 18 '22 21:10

jeet