thampi joseph
thampi joseph

Reputation: 690

Trouble facing with Google map in android

I am on the way of developing a Google map service in android. When i tried the development in my windows system, i got the map apk and installed it in my device. But now I am developing the same in Linux and getting gray squares instead of the map. I thought it was the issue related to the API keys. Thus I tried it with different API keys but of no use. Can anyone help me??

This is my manifest file

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

 <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="8" />

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

    <activity android:name=".MapsActivity">

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

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

 <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" /> 


 </manifest>

This is my logcat:

12-28 10:45:54.350: D/dalvikvm(303): GC_FOR_MALLOC freed 5018 objects / 307744 bytes in 971ms 12-28 10:45:54.799: D/dalvikvm(303): GC_FOR_MALLOC freed 9826 objects / 598976 bytes in 122ms 12-28 10:45:55.110: D/dalvikvm(303): GC_FOR_MALLOC freed 5062 objects / 330144 bytes in 103ms 12-28 10:45:55.420: D/dalvikvm(303): GC_FOR_MALLOC freed 6211 objects / 378792 bytes in 84ms 12-28 10:45:55.799: D/dalvikvm(303): GC_FOR_MALLOC freed 8531 objects / 652136 bytes in 98ms 12-28 10:45:55.970: D/dalvikvm(303): GC_FOR_MALLOC freed 6098 objects / 370088 bytes in 50ms 12-28 10:45:56.180: I/MapActivity(303): Handling network change notification:CONNECTED 12-28 10:45:56.180: E/MapActivity(303): Couldn't get connection factory client 12-28 10:45:59.480: D/dalvikvm(303): GC_FOR_MALLOC freed 6029 objects / 539232 bytes in 58ms 12-28 10:46:02.010: D/dalvikvm(303): GC_FOR_MALLOC freed 1367 objects / 165360 bytes in 46ms 12-28 10:46:04.510: D/dalvikvm(303): GC_FOR_MALLOC freed 1274 objects / 161632 bytes in 43ms 12-28 10:46:06.910: D/dalvikvm(303): GC_FOR_MALLOC freed 1274 objects / 161528 bytes in 42ms 12-28 10:46:09.360: D/dalvikvm(303): GC_FOR_MALLOC freed 1274 objects / 161600 bytes in 43ms 12-28 10:46:11.750: D/dalvikvm(303): GC_FOR_MALLOC freed 1274 objects / 161528 bytes in 44ms 12-28 10:46:18.300: D/dalvikvm(303): GC_FOR_MALLOC freed 1274 objects / 161552 bytes in 44ms

Upvotes: 2

Views: 278

Answers (1)

KeTaN
KeTaN

Reputation: 722

This is issue of "apiKey" you write xml file like below.

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    *android:apiKey="05M-7qOGbEjYduPPUdQgJt9ysL8HToawGdvu_ow*"
/> 

Not use windows pc "apikey". Now you change the "apikey" of linux pc and generate new .apk install it. may be your problem is solved.

check below : insted of red square use you keystore path which you get from windows.

enter image description here

Upvotes: 2

Related Questions