Android 不幸地<;我的应用程序>;已在加载google mapv2时关闭
我是android的初学者。。。我正在创建一个应用程序来加载Google map v2。但是它没有加载,并且每次都会死机,不幸的是它关闭了一条消息。请帮助我解决错误。提前谢谢。我是一个经常跟踪堆栈溢出的人Android 不幸地<;我的应用程序>;已在加载google mapv2时关闭,android,class,google-maps,map,Android,Class,Google Maps,Map,我是android的初学者。。。我正在创建一个应用程序来加载Google map v2。但是它没有加载,并且每次都会死机,不幸的是它关闭了一条消息。请帮助我解决错误。提前谢谢。我是一个经常跟踪堆栈溢出的人 **my code** **Main activity.java** package com.mypack.test; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFra
**my code**
**Main activity.java**
package com.mypack.test;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import android.os.Bundle;
import android.app.Activity;
import android.widget.Toast;
public class MainActivity extends Activity {
// Google Map
private GoogleMap googleMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try {
// Loading map
initilizeMap();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* function to load map. If map is not created it will create it for you
* */
private void initilizeMap() {
if (googleMap == null) {
googleMap = ((MapFragment) getFragmentManager().findFragmentById(
R.id.map)).getMap();
// check if map is created successfully or not
if (googleMap == null) {
Toast.makeText(getApplicationContext(),
"Sorry! unable to create maps", Toast.LENGTH_SHORT)
.show();
}
}
}
@Override
protected void onResume() {
super.onResume();
initilizeMap();
}
}
测试清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypack.test"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.mypack.test.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.mypack.test.permission.MAPS_RECEIVE" />
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<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.mypack.test.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>
<!-- Goolge API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDnHxpS7Pb6YeKBmyWjV_Slj9mIjo6M1FM" />
</application>
</manifest>
09-19 09:23:08.785: E/Trace(803): error opening trace file: No such file or directory (2)
09-19 09:23:09.515: W/dalvikvm(803): VFY: unable to resolve static field 1065 (MapAttrs) in Lcom/google/android/gms/R$styleable;
09-19 09:23:09.515: D/dalvikvm(803): VFY: replacing opcode 0x62 at 0x000e
09-19 09:23:09.525: D/AndroidRuntime(803): Shutting down VM
09-19 09:23:09.525: W/dalvikvm(803): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
09-19 09:23:09.535: E/AndroidRuntime(803): FATAL EXCEPTION: main
09-19 09:23:09.535: E/AndroidRuntime(803): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
09-19 09:23:09.535: E/AndroidRuntime(803): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.onCreateView(Activity.java:4716)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.setContentView(Activity.java:1881)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.mypack.test.MainActivity.onCreate(MainActivity.java:17)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.performCreate(Activity.java:5104)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.os.Looper.loop(Looper.java:137)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-19 09:23:09.535: E/AndroidRuntime(803): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 09:23:09.535: E/AndroidRuntime(803): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-19 09:23:09.535: E/AndroidRuntime(803): at dalvik.system.NativeStart.main(Native Method)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="myapp.mypack"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="myapp.mypack.googlemapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="myapp.mypack.googlemapsv2.permission.MAPS_RECEIVE"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<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="myapp.mypack.MapActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Goolge API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDnHxpS7Pb6YeKBmyWjV_Slj9mIjo6M1FM" />
</application>
</manifest>
09-20 01:19:51.980: E/Trace(26515): error opening trace file: No such file or directory (2)
09-20 01:19:52.020: W/GooglePlayServicesUtil(26515): Google Play services out of date. Requires 3264100 but found 3225134
09-20 01:19:52.190: D/libEGL(26515): loaded /system/lib/egl/libEGL_mali.so
09-20 01:19:52.210: D/libEGL(26515): loaded /system/lib/egl/libGLESv1_CM_mali.so
09-20 01:19:52.210: D/libEGL(26515): loaded /system/lib/egl/libGLESv2_mali.so
09-20 01:19:52.240: D/OpenGLRenderer(26515): Enabling debug mode 0
**Please help me to find a solution?**
编辑以前的代码并加载playservice和v4.jar后新建logcat
09-19 14:04:10.644: D/dalvikvm(1930): GC_CONCURRENT freed 1650K, 22% free 6514K/8284K, paused 76ms+19ms, total 279ms
09-19 14:04:10.644: D/dalvikvm(1930): WAIT_FOR_CONCURRENT_GC blocked 51ms
09-19 14:04:11.121: I/Choreographer(1930): Skipped 51 frames! The application may be doing too much work on its main thread.
09-19 14:04:13.281: I/Choreographer(1930): Skipped 170 frames! The application may be doing too much work on its main thread.
09-19 14:05:14.910: D/dalvikvm(1930): GC_CONCURRENT freed 85K, 7% free 7779K/8284K, paused 71ms+5ms, total 151ms
09-19 14:05:14.910: D/dalvikvm(1930): WAIT_FOR_CONCURRENT_GC blocked 64ms
09-19 14:05:15.040: E/MediaPlayer(1930): prepareAsync called in state 8
09-19 14:05:15.040: W/System.err(1930): java.lang.IllegalStateException
09-19 14:05:15.040: W/System.err(1930): at android.media.MediaPlayer.prepare(Native Method)
09-19 14:05:15.050: W/System.err(1930): at androassist.mypack.splash.onCreate(splash.java:38)
09-19 14:05:15.050: W/System.err(1930): at android.app.Activity.performCreate(Activity.java:5104)
09-19 14:05:15.060: W/System.err(1930): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-19 14:05:15.060: W/System.err(1930): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 14:05:15.060: W/System.err(1930): at android.os.Looper.loop(Looper.java:137)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-19 14:05:15.071: W/System.err(1930): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 14:05:15.071: W/System.err(1930): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 14:05:15.071: W/System.err(1930): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-19 14:05:15.080: W/System.err(1930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-19 14:05:15.080: W/System.err(1930): at dalvik.system.NativeStart.main(Native Method)
09-19 14:05:20.561: I/Choreographer(1930): Skipped 39 frames! The application may be doing too much work on its main thread.
09-19 14:05:21.551: I/Choreographer(1930): Skipped 222 frames! The application may be doing too much work on its main thread.
09-19 14:05:22.491: I/Choreographer(1930): Skipped 225 frames! The application may be doing too much work on its main thread.
09-19 14:05:26.330: W/IInputConnectionWrapper(1930): showStatusIcon on inactive InputConnection
09-19 14:05:28.770: D/Notice(1930): Entering log
09-19 14:05:28.920: D/Key(1930): key matched
09-19 14:05:32.620: I/Choreographer(1930): Skipped 783 frames! The application may be doing too much work on its main thread.
09-19 14:05:33.422: I/Choreographer(1930): Skipped 174 frames! The application may be doing too much work on its main thread.
09-19 14:05:35.290: I/Choreographer(1930): Skipped 55 frames! The application may be doing too much work on its main thread.
09-19 14:05:59.101: D/Notice(1930): Entering log
09-19 14:05:59.831: I/Choreographer(1930): Skipped 48 frames! The application may be doing too much work on its main thread.
09-19 14:06:00.600: I/MyApp(1930): Silent mode
09-19 14:06:00.710: I/Choreographer(1930): Skipped 115 frames! The application may be doing too much work on its main thread.
09-19 14:06:01.280: I/Choreographer(1930): Skipped 48 frames! The application may be doing too much work on its main thread.
09-19 14:06:15.223: D/Notice(1930): Entering log
09-19 14:06:15.900: I/Choreographer(1930): Skipped 54 frames! The application may be doing too much work on its main thread.
09-19 14:06:16.712: I/MyApp(1930): Silent mode
09-19 14:06:16.930: I/Choreographer(1930): Skipped 187 frames! The application may be doing too much work on its main thread.
09-19 14:06:17.620: I/Choreographer(1930): Skipped 92 frames! The application may be doing too much work on its main thread.
09-19 14:06:26.514: D/Notice(1930): Entering log
09-19 14:06:27.103: I/Choreographer(1930): Skipped 50 frames! The application may be doing too much work on its main thread.
09-19 14:06:28.241: D/GPS(1930): GPS Enabled
09-19 14:06:28.265: D/loc message:(1930): fmygpslo(0.00.0)
09-19 14:06:28.731: I/Choreographer(1930): Skipped 381 frames! The application may be doing too much work on its main thread.
09-19 14:06:34.700: I/Choreographer(1930): Skipped 177 frames! The application may be doing too much work on its main thread.
谢谢你花了宝贵的时间。我得到了解决方案…这是我的错误。。。
正如Reghundandan和Patrik所说。引用google playstore服务有问题。。我的应用程序引用SDK目录中的google playstore服务,而不是我工作区中加载的google playstore版本。因此,上述错误已被清除。。运行应用程序时,地图未加载。。我使用以下代码进行了检查
package myapp.mypack;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.widget.Toast;
public class MapActivity extends FragmentActivity {
String msgtype,sendernum;
// Google Map
private GoogleMap googleMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(check())
{
setContentView(R.layout.app_main);
Toast.makeText(this, "In Google play service.", Toast.LENGTH_LONG).show();
initFun();
}
else
{
Toast.makeText(this, "Google play service not available.", Toast.LENGTH_LONG).show();
}
}
private Boolean check()
{
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if(status==ConnectionResult.SUCCESS)
{
return true;
}
return false;
}
public void initFun()
{
SupportMapFragment sp = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
googleMap = sp.getMap();
googleMap.setMyLocationEnabled(true);
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.map, menu);
return true;
}
}
Android清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypack.test"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.mypack.test.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.mypack.test.permission.MAPS_RECEIVE" />
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<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.mypack.test.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>
<!-- Goolge API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDnHxpS7Pb6YeKBmyWjV_Slj9mIjo6M1FM" />
</application>
</manifest>
09-19 09:23:08.785: E/Trace(803): error opening trace file: No such file or directory (2)
09-19 09:23:09.515: W/dalvikvm(803): VFY: unable to resolve static field 1065 (MapAttrs) in Lcom/google/android/gms/R$styleable;
09-19 09:23:09.515: D/dalvikvm(803): VFY: replacing opcode 0x62 at 0x000e
09-19 09:23:09.525: D/AndroidRuntime(803): Shutting down VM
09-19 09:23:09.525: W/dalvikvm(803): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
09-19 09:23:09.535: E/AndroidRuntime(803): FATAL EXCEPTION: main
09-19 09:23:09.535: E/AndroidRuntime(803): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
09-19 09:23:09.535: E/AndroidRuntime(803): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.onCreateView(Activity.java:4716)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.setContentView(Activity.java:1881)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.mypack.test.MainActivity.onCreate(MainActivity.java:17)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.performCreate(Activity.java:5104)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.os.Looper.loop(Looper.java:137)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-19 09:23:09.535: E/AndroidRuntime(803): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 09:23:09.535: E/AndroidRuntime(803): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-19 09:23:09.535: E/AndroidRuntime(803): at dalvik.system.NativeStart.main(Native Method)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="myapp.mypack"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="myapp.mypack.googlemapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="myapp.mypack.googlemapsv2.permission.MAPS_RECEIVE"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<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="myapp.mypack.MapActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Goolge API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDnHxpS7Pb6YeKBmyWjV_Slj9mIjo6M1FM" />
</application>
</manifest>
09-20 01:19:51.980: E/Trace(26515): error opening trace file: No such file or directory (2)
09-20 01:19:52.020: W/GooglePlayServicesUtil(26515): Google Play services out of date. Requires 3264100 but found 3225134
09-20 01:19:52.190: D/libEGL(26515): loaded /system/lib/egl/libEGL_mali.so
09-20 01:19:52.210: D/libEGL(26515): loaded /system/lib/egl/libGLESv1_CM_mali.so
09-20 01:19:52.210: D/libEGL(26515): loaded /system/lib/egl/libGLESv2_mali.so
09-20 01:19:52.240: D/OpenGLRenderer(26515): Enabling debug mode 0
**Please help me to find a solution?**
在设备上运行..您是否在android地图项目中引用了google play services库项目?请将google play services库作为库项目添加到您的项目中。感谢您的回复..是的,我引用了google play service…但它属于android私有库..我在stackoverflow中看到一个解决方案说google play服务应该作为.jar导入到libaries文件夹之外。我还创建了一个文件夹lib,并将google_play_services.jar和android-support-V4.jar放入其中。@AnishUbais您不应该将jar放入libs文件夹。你需要在你的android地图上引用同样的内容project@Reghunandan..please告诉我如何引用罐子…谢谢hanks@swati srivastav..你能告诉我错误吗..这是logcat(请查看上面的新logcat)…实际上没有列出错误,但应用程序仍然崩溃..在哪个设备上运行应用程序?s3 mini..playstore构建版本:4.3.11