Issue
Good Morning Everyone,
I am trying to run map on my avd. But it gives me some errors. I am new On Android. Below is my steps:
1.My avd displays, Map1 won't run unless you update Google play services.
2.Run log displays:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270.
3.I have tried to search and found that I need to update my play services.
3.1. So I manually downloaded apk
file and try to install it within AVD
. but it won't work.
3.2. So I follow SDKManager->AndroidSDK->SDKTools->and updated all
.
3.3. And File->Project Structure->App->Dependencies->added Play Services Manually
.
3.4 Then at Last I try The Same Code with different AVD API 20-25 levels and get the same output: '
$ adb shell am start -n "***********.map1/***********.map1.MapsActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 4080 on device Nexus_4_API_22 [emulator-5554] I/InstantRun: Instant Run Runtime started. Android package is ***********.map1, real application class is null. W/art: Failed to find OatDexFile for DexFile /data/data/**********.map1/files/instant-run/dex/slice-slice_2-classes.dex ( canonical path /data/data/***********.map1/files/instant-run/dex/slice-slice_2-classes.dex) with checksum 0xfc12792c in OatFile /data/data/*********.map1/cache/slice-slice_2-classes.dex I/FirebaseInitProvider: FirebaseApp initialization unsuccessful W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9683270 D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
[ 11-03 11:15:10.206 4080: 4080 D/ ] HostConnection::get() New Host Connection established 0xa2c050d0, tid 4080 D/Atlas: Validating map...
I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Enabling debug mode 0 W/EGL_emulation: eglSurfaceAttrib not implemented W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c065e0, error=EGL_SUCCESS`
- My code works on my device properly. I want to run it on my AVD.
5.My AVD has:
5.1:
` Name: Nexus_5_API_21
CPU/ABI: Google APIs Intel Atom (x86)
Path: C:\**\*****\.android\avd\Nexus_5_API_21.avd
Target: google_apis [Google APIs] (API level 21)
Skin: nexus_5
SD Card: 100M
hw.dPad: no
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: Nexus 5
vm.heapSize: 64
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.initialOrientation: Portrait
image.androidVersion.api: 21
hw.audioInput: yes
image.sysdir.1: system-images\android-21\google_apis\x86\
tag.id: google_apis
showDeviceFrame: yes
hw.camera.back: emulated
hw.mainKeys: no
AvdId: Nexus_5_API_21
hw.camera.front: emulated
hw.lcd.density: 480
avd.ini.displayname: Nexus 5 API 21
hw.gpu.mode: auto
hw.device.hash2: MD5:*********ceb7d385183***********
hw.ramSize: 1536
hw.trackBall: no
hw.battery: yes
hw.cpu.ncore: 2
hw.sdCard: yes
tag.display: Google APIs
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: yes
1
disk.dataPartition.size: 800M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes`
Solution
First try to update your AVD Services. if luck is with you then it will work and your map starts otherwise.
All You Need TO Do is Just Start The AVD and follow These :-
Go to settings->Apps->ALL->Google Play Services and Note the Version You have In your AVD.
now Open Your build.gradle(Module:app) not build.gradle(Project: '****') and change the Dependencies to the [compile 'com.google.android.gms:play-services:{Your Version of services}].
wish you Good luck ;)
Answered By - vikas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.