0
現在面臨上運行谷歌地圖V2致命異常,我做進口谷歌播放服務-lib的 ,並從谷歌的API,並且mainfest現在用:顯示谷歌地圖V2
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.getlocation"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.example.getLocation.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.getlocation.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"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.getlocation.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>
<activity android:name="com.example.getlocation.map"
android:screenOrientation="portrait"
></activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyB7rXLp7f3cnZ0sdjqQnCQiPbiPpkNVmPc"/>
</application>
</manifest>
和地圖佈局XML是:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/the_map"
android:name="com.google.android.gms.maps.SupportMapFragment "
android:layout_width="match_parent"
android:layout_height="match_parent" />
這裏是類活性:
包com.example.getlocation;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
public class map extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
}
}
和手機時許版本上運行是2.3.6,
可以發佈堆棧跟蹤 – Raghunandan
在關閉標籤' application>'之前添加''標籤。 –
@divya它也不工作。 –