我正在尝试在模拟器上安装2个软件包以使用谷歌地图,但我在日志猫中遇到问题,我不知道如何在模拟器上修复此错误它显示此应用程序不会运行,除非你更新谷歌播放服务任何人都可以帮助我??? 这些是我用来构建简单的文件和代码
package com.example.googlemapv2;
import android.os.Bundle;
import android.app.Activity;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
public class MainActivity extends FragmentActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:name="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemapv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="17" />
<permission
android:name="com.example.googlemapv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="your.application.package.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" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="API KEY" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.googlemapv2.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>
</application>
</manifest>
04-12 09:27:58.548: E/Trace(622): error opening trace file: No such file or directory (2)
04-12 09:27:59.448: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:27:59.468: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:27:59.498: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:27:59.510: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:27:59.537: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:27:59.578: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:27:59.888: D/gralloc_goldfish(622): Emulator without GPU emulation detected.
04-12 09:28:13.158: W/GooglePlayServicesUtil(622): Google Play services out of date. Requires 3027100 but found 2012110
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): KeyEvent: ACTION_UP but key was not down.
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): in com.android.internal.policy.impl.PhoneWindow$DecorView@414a00c0
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): 0: sent at 692046000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=692046, downTime=691902, deviceId=0, source=0x101 }
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): -- recent events --
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): 1: sent at 222169403000, (unhandled) MotionEvent { action=ACTION_UP, id[0]=0, x[0]=464.0, y[0]=562.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=222169, downTime=222095, deviceId=0, source=0x1002 }
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): 2: sent at 222095935000, (unhandled) MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=464.0, y[0]=562.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=222095, downTime=222095, deviceId=0, source=0x1002 }
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): 3: sent at 146103826000, MotionEvent { action=ACTION_UP, id[0]=0, x[0]=111.0, y[0]=287.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=146103, downTime=146009, deviceId=0, source=0x1002 }
04-12 09:37:16.108: D/InputEventConsistencyVerifier(622): 4: sent at 146009274000, MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=111.0, y[0]=287.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=146009, downTime=146009, deviceId=0, source=0x1002 }
04-12 09:37:16.208: D/dalvikvm(622): GC_CONCURRENT freed 257K, 3% free 10934K/11271K, paused 22ms+10ms, total 144ms