在Android中显示地图?
我正在开发一个应用程序,我想在我的设备安卓2.3.3上显示地图,它不会在我的日志中显示错误 我有台阶 从debug.keystore获取SHA1代码 在GoogleAPI控制台中创建一个新项目 注册一个新的id 启用谷歌地图android api v2 使用输入SHA1创建一个android密钥;it.mappe(it.mappe是我的包) 获取API密钥 更新AndroidManifest文件 我的雄激素清单在Android中显示地图?,android,google-maps-api-3,Android,Google Maps Api 3,我正在开发一个应用程序,我想在我的设备安卓2.3.3上显示地图,它不会在我的日志中显示错误 我有台阶 从debug.keystore获取SHA1代码 在GoogleAPI控制台中创建一个新项目 注册一个新的id 启用谷歌地图android api v2 使用输入SHA1创建一个android密钥;it.mappe(it.mappe是我的包) 获取API密钥 更新AndroidManifest文件 我的雄激素清单 <manifest xmlns:android="http://schemas
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.technowellservices.getmapv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<permission
android:name="com.technowellservices.getmapv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission
android:name="net.learn2develop.googlemaps.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name=
"com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.technowellservices.getmapv2.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyA-NLsxXkMDXioRUcWameZSv7SFu_UPIyI" />
</application>
改变这个
class="com.google.android.gms.maps.MapFragment"
到
您缺少一个元标记。核对答案@
扩展FragmentActivity
并使用SupportMapFragment
这是可以删除的
<permission
android:name="com.technowellservices.getmapv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission
android:name="net.learn2develop.googlemaps.permission.MAPS_RECEIVE" />
更改此选项
<uses-permission
android:name="net.learn2develop.googlemaps.permission.MAPS_RECEIVE" />
对此
<uses-permission
android:name="com.technowellservices.getmapv2.permission.MAPS_RECEIVE" />
清理您的项目,然后再次测试。您已经标记了i googl maps api 3,我想应该是maps apiv2@Durga转到这个问题@Durga,据我所知,这个建议是正确的,因为你的最小sdk是8。你需要使用supportmapfragment@Durga您需要在做出更改后重新运行应用程序,并发布新的stacktracenot-need(从api v2开始)。选中specify permissions@not needed表示我们可以在uses\u权限标记中写入任何包?在他的问题中,他提到了错误的软件包…不需要意味着你可以简单地删除该许可证。它不需要,所以它将被忽略。无论如何,这不是真正的问题
<permission
android:name="com.technowellservices.getmapv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission
android:name="net.learn2develop.googlemaps.permission.MAPS_RECEIVE" />
<uses-permission
android:name="net.learn2develop.googlemaps.permission.MAPS_RECEIVE" />
<uses-permission
android:name="com.technowellservices.getmapv2.permission.MAPS_RECEIVE" />