开发者

Android - Google Maps integration empty grid

I have tried to use Google Maps API in my app. I have made key fingerprint, inserted into app, I tried to see some map (doesn't matther what map is it now), but all I see is a empty grid. I have in manifest

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

I have my build AVD targeted at Gogle Api's, and all I see is the empty grid. Do you know, what can be wrong? My next thought was about to use build maps and link to them from my current app, when I will additionally show my position. But is it possible?

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.app.seven"
  android:versionCode="1"
  android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
    <uses-library android:required="true" android:name="com.google.android.maps" />
    <activity android:name=".myAvis"
              android:label="@string/app_name"
              android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".menu"
              android:label="@string/app_name"
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.NoTitleBar">      
    </activity>
    <activity android:name=".finActivity"
              android:screenOrientation="po开发者_开发知识库rtrait"
              android:theme="@android:style/Theme.NoTitleBar">      
    </activity>
    <activity android:name=".calendar"
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.NoTitleBar">      
    </activity>
    <activity android:name=".enquiry"
              android:screenOrientation="portrait"
              android:label="@string/enquiryTitle"
              android:windowSoftInputMode="stateVisible|adjustResize">      
    </activity>
    <activity android:name=".update"
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.Dialog"
              android:label="@string/updateString">     
    </activity>
    <activity android:name=".photo"
              android:screenOrientation="portrait">
    </activity>
    <activity android:name=".mapa"
                android:theme="@android:style/Theme.NoTitleBar">
    </activity>

</application>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
<uses-permission android:name="android.permission.DELETE_PACKAGES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />


</manifest> 


Ok here is few steps that you can do to get MD5 key..

  1. Use this command keytool -list -keystore "..(navigate to).android\debug.keystore"
  2. It will ask you for password just press enter.
  3. You will get some key paste that in http://code.google.com/android/add-ons/google-apis/maps-api-signup.html
  4. Your API key will get generate in nice XML format.
  5. Paste this key in you MapView and try again


The new (1.7) java generates SHA1 key as default. Add the -v option to the keytool parameter set, and you'll get an MD5 hash too.


just put -v after the list like the write below these will give you the MD5 file

keytool -v -list -keystore "..(navigate to).android\debug.keystore"

Please +1 if this is usefull or you can check here

http://irahuldev.blogspot.in/2012/03/how-to-get-google-maps-api-key-for.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜