我一直对这个程序现在快一年了(高级项目),当它刚刚决定,打破了前几天。我的应用程序已使用Eclipse版本3.7.2针对64位的Froyo的Android 2.2开发的,用我的Windows 7 64位PC。到目前为止,我已经尝试过:
I've been working on this app for almost a year now (senior project) when it just decided to break a few days ago. My application has been developed using Eclipse version 3.7.2 64bit targeting Froyo Android 2.2, using my Windows 7 64bit pc. So far I have tried:
重新安排使用库标签清单文件 重写映射xml文件 删除R.java文件并刷新 在布局中放置的MapView元素 重新安装Eclipse和Android的SDK 清洁项目 创建style.xml文件,并引用它 在部署一个实际的设备上 还原为previous code和可能更多...
我的code如下: gmap.xml
My code is as follows: gmap.xml
<?xml version="1.0" encoding="utf-8"?>
<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:clickable="true"
android:apiKey="0xMbgnc-el963gCdpl547hdkgXUILTskZr-T5uvg" // random key posted here
/>
AndroidManifest.xml中
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.PubMe"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk android:minSdkVersion="8"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".PubMeActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MappingActivity"
android:label="@string/app_name">
</activity>
</application>
</manifest>
我强烈AP preciate提前任何帮助。
I highly appreciate any help in advance.
这些都是权限,你应该有正常的地图V2
these are the permissions you should have normally for a map v2
<permission
android:name="com.example.gmapsapp.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.gmapsapp.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
和API密钥现在清单文件与meta标签中使用
and the api key is now used in manifest file with meta tag
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="@string/apikey />
在这里我包括GMaps实现的xml文件的例子
here I am including a xml file example of gmaps
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
上一篇:扩展在不同的APK我的Android应用程序我的、应用程序、不同、APK
下一篇:Android的 - 坏的通知贴 - 无法扩大RemoteViews为:StatusBarNotification通知、Android、StatusBarNotification、RemoteView