很抱歉,如果这是一个重复的问题......但是我找到了很多答案,我仍然没有找到我可以使用的答案或我的申请
这是我的机器人清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.id.adhe.agmv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<permission
android:name="co.id.adhe.agmv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="co.id.adhe.agmv2.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_GSERVICE"/>
<!-- the following two permission 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-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" >
<meta-data
android:name="com.google.android.gms.version"
android:value="4452000" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCbQI8EPBa1wy3lypoq1DW9tkMzQXi8JnE"/>
<activity
android:name="co.id.adhe.agmv2.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>
这个我的片段主要是:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="co.id.adhe.agmv2.MainActivity$PlaceholderFragment" >
<TextView
android:id="@+id/header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_below="@+id/header"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
我的设置: 目标:Google API 平台:4.2.2 API等级:17
这是我的logcat eror:
05-23 15:45:57.613: E/AndroidRuntime(1134): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms flg=0x80000 pkg=com.android.vending }
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.Activity.startActivityForResult(Activity.java:3370)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.Activity.startActivityForResult(Activity.java:3331)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.Activity.startActivity(Activity.java:3566)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.Activity.startActivity(Activity.java:3534)
05-23 15:45:57.613: E/AndroidRuntime(1134): at com.google.android.gms.dynamic.a$5.onClick(Unknown Source)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.view.View.performClick(View.java:4204)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.view.View$PerformClick.run(View.java:17355)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.os.Handler.handleCallback(Handler.java:725)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.os.Handler.dispatchMessage(Handler.java:92)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.os.Looper.loop(Looper.java:137)
05-23 15:45:57.613: E/AndroidRuntime(1134): at android.app.ActivityThread.main(ActivityThread.java:5041)
05-23 15:45:57.613: E/AndroidRuntime(1134): at java.lang.reflect.Method.invokeNative(Native Method)
05-23 15:45:57.613: E/AndroidRuntime(1134): at java.lang.reflect.Method.invoke(Method.java:511)
05-23 15:45:57.613: E/AndroidRuntime(1134): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-23 15:45:57.613: E/AndroidRuntime(1134): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-23 15:45:57.613: E/AndroidRuntime(1134): at dalvik.system.NativeStart.main(Native Method)
05-23 15:46:00.183: I/Process(1134): Sending signal. PID: 1134 SIG: 9
我在sdk中关注谷歌更新服务等论坛中的一些答案并添加元标记...但是avd仍然要求更新google avd play服务..
当我点击更新直接应用程序崩溃时...
有什么建议吗?
答案 0 :(得分:0)
您的项目中存在与Google Play服务相关的错误, 要么在设备中运行您的项目,要么尝试第三方模拟器genymotion。
答案 1 :(得分:0)
在应用程序标记
中的清单文件中添加以下代码 <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="your google api key" />