【问题标题】:how to run map on avd Android Studio ide?如何在 avd Android Studio ide 上运行地图?
【发布时间】:2016-11-03 06:12:14
【问题描述】:

大家早上好,

我正在尝试在我的 avd 上运行地图。但这给了我一些错误。我是 Android 上的新手。以下是我的步骤:

1.我的 avd 显示,除非您更新 Google Play 服务,否则 Map1 将无法运行。

2.运行日志显示:

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9877000 but found 9683270.

3.我尝试搜索,发现我需要更新我的播放服务。

3.1。所以我手动下载了apk文件并尝试在AVD中安装它。但它不会工作。

3.2。所以我关注SDKManager->AndroidSDK->SDKTools->and updated all

3.3。还有File->Project Structure->App->Dependencies->added Play Services Manually

3.4 然后最后我尝试使用不同的 AVD API 20-25 级别的相同代码并获得相同的输出: '

$ adb shell am start -n "***********.map1/***********.map1.MapsActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER 连接到设备 Nexus_4_API_22 [emulator-5554] 上的进程 4080 I/InstantRun:Instant Run Runtime 已启动。安卓包是 ***********.map1,真正的应用程序类为空。 W/art: 未能为 DexFile 找到 OatDexFile /data/data/**********.map1/files/instant-run/dex/slice-slice_2-classes.dex (规范路径 /data/data/***********.map1/files/instant-run/dex/slice-slice_2-classes.dex) OatFile 中的校验和为 0xfc12792c /data/data/*********.map1/cache/slice-slice_2-classes.dex I/FirebaseInitProvider:FirebaseApp 初始化不成功 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil: Google Play 服务过时。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil: Google Play 服务过时。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil: Google Play 服务过时。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil: Google Play 服务过时。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil: Google Play 服务过时。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil: Google Play 服务过时。需要 9877000 但找到 9683270 W/GooglePlayServicesUtil:Google Play 服务已过期。需要 9877000 但发现 9683270 D/OpenGLRenderer:使用 EGL_SWAP_BEHAVIOR_PRESERVED:真

              [ 11-03 11:15:10.206  4080: 4080 D/         ]
              HostConnection::get() New Host Connection established 0xa2c050d0, tid 4080 D/Atlas: Validating map...

I/OpenGLRenderer:初始化 EGL,1.4 版 D/OpenGLRenderer: 启用调试模式 0 W/EGL_emulation: eglSurfaceAttrib not 已实现 W/OpenGLRenderer:无法设置 EGL_SWAP_BEHAVIOR 表面 0xa2c065e0,错误=EGL_SUCCESS`

  1. 我的代码可以在我的设备上正常运行。我想在我的 AVD 上运行它。

5.我的 AVD 有:

5.1:

`名称: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`

【问题讨论】:

    标签: android google-play-services avd


    【解决方案1】:

    首先尝试更新您的 AVD 服务。如果你运气好,那么它会起作用,否则你的地图就会开始。

    您需要做的就是启动 AVD 并按照以下步骤操作:-

    1. 转到设置->应用程序->所有->Google Play 服务 并记下您的 AVD 中的版本。

    2. 现在打开你的 build.gradle(Module:app) 而不是 build.gradle(Project: '****') 并将依赖项更改为 [compile 'com.google.android.gms:play- services:{您的服务版本}]。

    祝你好运;)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-20
      • 2022-12-17
      • 2016-09-13
      • 2018-03-17
      • 2023-01-29
      相关资源
      最近更新 更多