[英]Accessing google maps in android emulator
我正在使用谷歌地图数据开发一个Android应用程序。我可以在模拟器中访问谷歌地图,但当我在我的应用程序中尝试相同时,谷歌地图没有打开。问题是什么?帮助
Sounds like your not using the Google API in the emulator: 听起来您没有在模拟器中使用Google API:
http://code.google.com/android/add-ons/google-apis/ http://code.google.com/android/add-ons/google-apis/
You need to create an Android Virtual Device (AVD) with the google API: 您需要使用Google API创建Android虚拟设备(AVD):
In the above screenshot you can see that 'test_avd' does not use the google API. 在上面的屏幕截图中,您可以看到'test_avd'不使用google API。 Also you can see 'test_maps_avd' does use the google API.
您还可以看到'test_maps_avd'确实使用了google API。
First of all I would try doing this example . 首先,我会尝试这个例子 。
Check that your manifest has: 检查你的清单是否有:
<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.INTERNET" />
Also remember that your view should have something like this: 还要记住你的观点应该是这样的:
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="Your Maps API Key"
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.