У меня возникла проблема при запуске моего эмулятора в студии Android. Эмулятор предложит мне «Google Map API Demo не будет запущен, если вы не обновите сервисы Google Play».Google Map API Demo не будет запущен, если вы не обновите сервисы Google Play
Я вижу это сообщение об ошибке:
--------- beginning of crash 02-03 13:29:47.762 2870-2870/com.example.xxx_000.googlemapapidemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.xxx_000.googlemapapidemo, PID: 2870
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_9683000--- flg=0x80000 pkg=com.android.vending }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
at android.app.Activity.startActivityForResult(Activity.java:3917)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:48)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:75)
at android.app.Activity.startActivityForResult(Activity.java:3877)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:856)
at android.app.Activity.startActivity(Activity.java:4200)
at android.app.Activity.startActivity(Activity.java:4168)
at com.google.android.gms.dynamic.zza$5.onClick(Unknown Source)
at android.view.View.performClick(View.java:5198)
at android.view.View$PerformClick.run(View.java:21147)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 02-03 13:29:49.877 2870-2870/com.example.xxx_000.googlemapapidemo I/Process: Sending signal. PID: 2870 SIG: 9 02-03 13:35:13.441 5142-5142/com.example.xxx_000.googlemapapidemo W/System: ClassLoader referenced unknown path: /data/app/com.example.xxx_000.googlemapapidemo-1/lib/x86 02-03 13:35:13.504 5142-5142/com.example.xxx_000.googlemapapidemo I/FirebaseInitProvider: FirebaseApp initialization unsuccessful 02-03 13:35:13.713 5142-5142/com.example.xxx_000.googlemapapidemo W/GooglePlayServicesUtil: Google Play services out of date. Requires 9683000 but found 9452470 02-03 13:35:13.726 5142-5142/com.example.xxx_000.googlemapapidemo ... 5142-5261/com.example.xxx_000.googlemapapidemo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
Мой файл build.gradle как это:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.xxx_000.googlemapapidemo"
minSdkVersion 17
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "2g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.google.android.gms:play-services:9.6.1'
}
Может кто-нибудь мне помочь? Спасибо!
попробуйте в реальном устройстве, это работает. у вашего эмулятора нет игровых сервисов. –
О, ладно .. Я попробую с реальным устройством. Спасибо огромное! – Jane
, и он будет работать на устройствах, в которых установлена игровая служба и такая же или более высокая версия 9.6,1 –