2012-03-24 84 views
0

我生成了一個簽名的密鑰庫,並使用它生成了MD5指紋圖的MD5指紋圖片,該圖片位於MD5的註冊頁面中...整個過程是好的,但是當我使用該API鍵時,我沒有在地圖中獲取位置,只顯示空白貼圖。android:google map,生成簽名密鑰庫時不顯示位置

我在命令提示符使用:

C:\Program Files\Java\jdk1.6.0\bin>keytool.exe -list -alias saurabhtrivedi -keysto 
    "C:\Documents and Settings\Saurabh\.android\ArtPhone_keystorefinal.keystore" 
    torepass up78ak5831 -keypass up78ak5831 
up78ak5831, Mar 24, 2012, PrivateKeyEntry, 
    Certificate fingerprint (MD5): ******************************* 

我pastred我下面的清單文件。

<?xml version="1.0" encoding="UTF-8"?> 
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.artphone.galleries" 
    android:versionCode="1" 
    android:versionName="0.1" 
    > 
    <uses-sdk android:minSdkVersion="4" /> 
    <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.WRITE_EXTERNAL_STORAGE"/> 
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/> 
    <uses-permission android:name="android.permission.CALL_PHONE"/> 
    <uses-permission android:name="android.permission.INSTALL_PACKAGES"/> 
    <uses-permission android:name="android.permission.VIBRATE"/> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <application android:icon="@drawable/applogo" android:label="@string/app_name" 

    > 
      <uses-library android:name="com.google.android.maps" /> 
      <activity 
      android:name=".SplashScreen" 
      android:screenOrientation="portrait" 
      android:label="@string/app_name" 
      > 
      <intent-filter> 
      <action android:name="android.intent.action.MAIN"/> 
      <category android:name="android.intent.category.LAUNCHER"/> 
      </intent-filter> 
      </activity> 
      <activity android:name="currentlocmap" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="filter" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="keywordsearch" 
      android:screenOrientation="portrait" 
      android:windowSoftInputMode="adjustPan" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="keywordxmlparsing" 
      android:screenOrientation="portrait" 
      android:windowSoftInputMode="adjustPan" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="Artistspacedetailview" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation" 
      android:windowSoftInputMode="adjustPan" 
      /> 
      <activity android:name="loadingimage" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="keywordpagetabs" 
      android:screenOrientation="portrait" 
      android:windowSoftInputMode="adjustPan" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="filterpagetabs" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation" 
      android:windowSoftInputMode="adjustPan" 
      /> 
      <activity android:name="artistspacedetailviewTab" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="filtersearchresultparsing" 
      android:windowSoftInputMode="adjustPan" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="keywordresulttab" 
      android:screenOrientation="portrait" 
      android:windowSoftInputMode="adjustPan" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="filterpageresulttab" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation" 
      android:windowSoftInputMode="adjustPan" 
      /> 
      <activity android:name="artspacedetailShowingNow" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="detailviewshowingnowTab" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
      <activity android:name="LatLongparsing" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation" /> 
      <activity android:name="MyMap" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation" /> 
      <activity android:name="MainMenu" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation" /> 
      <activity android:name="spaceinfo" 
      android:screenOrientation="portrait" 
      android:configChanges="keyboardHidden|orientation"/> 
       <activity android:name="OpeningToday" 
       android:screenOrientation="portrait" 
       android:configChanges="keyboardHidden|orientation"/> 
       <activity android:name="Map" 
       android:screenOrientation="portrait" 
       android:configChanges="keyboardHidden|orientation"/> 
       <activity android:name="Maptab" 
       android:screenOrientation="portrait" 
       android:configChanges="keyboardHidden|orientation"/> 
       <activity android:name="Loadingimagetab" 
       android:screenOrientation="portrait" 
       android:configChanges="keyboardHidden|orientation"/> 
       </application> 
       <supports-screens 
       android:anyDensity = "true" 
       android:smallScreens="true" 
       android:normalScreens="true" 
       android:largeScreens="true" 
      /> 
    </manifest> 

回答

0

你應該在你的地圖的活動佈局中插入你的谷歌地圖api key在com.google.android.maps.MapView對象中。 實施例:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <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:apiKey="your_api_key" 
      android:clickable="true" > 

     </com.google.android.maps.MapView> 

</LinearLayout> 

這裏的完整的一步一步的教程:http://developer.android.com/resources/tutorials/views/hello-mapview.html