我试图让GoogleMaps显示在模拟器或我的Android设备上。无法让GoogleMaps在Android上显示
我已经经历了一切关于这个在互联网上,有没有运气
布局 - main.xml中有apiKey我debug.keystore
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/myLocationText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<com.google.android.maps.MapView
android:id="@+id/myMapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
**android:apiKey="0QVYGuX4_0vLI8Uro3uUP3GYvG539JlObdsXxHA"**
/>
</LinearLayout>
该清单包括INTERNET和ACCESS_FINE_LOCATION权限
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jt.com.whereami">
<application
android:icon="@drawable/icon">
<uses-library android:name="com.google.android.maps"/>
<activity
android:name=".WhereAmI"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-sdk android:minSdkVersion="7" />
</manifest>
地图显示出来,但只显示框。
我使用Eclipse来开发,一切正常。
有什么我失踪了吗?
调试键唯一作品使用debug.keystore,确保您正在运行应用程序,方法是右键单击项目并选择debug作为android。如果密钥错误,logcat中应该有与获取地图图块有关的例外情况。 – 2011-03-23 20:40:31
相同的东西.. Logcat中关于错误的内容不存在 调试为android在模拟器和设备上都具有相同的结果。 – Bikeaccdnt 2011-03-23 20:58:40
您的.WhereAmI.java类扩展了MapActivity? – 2011-03-23 23:24:42