2013-08-02 86 views
1

我是一個新的android開發人員。 我做了谷歌Android地圖應用程序, 但只顯示空磚(不顯示地圖)谷歌地圖應用程序不工作在android

我已經產生了5次API密鑰&使用它......但沒有一個是工作

Manifiest

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.akki" 
    android:versionCode="1" 
    android:versionName="1.0" > 

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

    <uses-permission android:name="android.permission.SET_DEBUG_APP" > 
    </uses-permission>`enter code here` 

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

     <!-- Add Google Map Library --> 
     <uses-library android:name="com.google.android.maps" /> 

     <activity 
      android:label="@string/app_name" 
      android:name=".GoogleMapPracticeActivity" > 
      <intent-filter > 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 

    <!-- Allow to connect with internet --> 
    <uses-permission android:name="android.permission.INTERNET" /> 
</manifest> 

XML

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 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="AIzxxxxxxxxxxxxxxxxxxxxxxxxxxxxMh2JQY" 
     android:clickable="true" /> 

</RelativeLayout> 
+1

使用google map api v1。其棄用的使用地圖api v2。 – Raghunandan

+0

試試這個:http://stackoverflow.com/questions/17263328/getting-failed-to-load-map-error-contacting-google-servers/17269641#17269641 – Prachi

回答

相關問題