2013-10-21 54 views
1

我必须测试使用Google地图的现有Android应用程序。我能够在带有Google API的模拟器AVD(API 17)中运行它。我必须在三星Galaxy S4(1920x1080)等高分辨率设备上进行测试。然后,我更新了SDK,现在所有使用Google API的AVD(新创建的旧&)都具有相同的行为方式:启动但启动后,出现分段错误(核心转储)并崩溃。 DDMS监视器显示最后一个错误与EGL相关。带有Google API的Android仿真程序在启动后立即崩溃

我使用2GB内存和AMD Turion64 1.6Ghz处理器从Linux机器(Fedora,内核2.6.35)运行模拟器。

尝试使用API​​ 16,17和18运行它,仍然发生相同的错误。具有普通SDK的AVD工作正常,问题在于使用Play,Map服务等的Google API。尝试过模拟器,但它甚至无法启动。

尝试过在这个(Android emulator segmentation fault)中的提示,但不起作用。下面是当Nexus10的AVD(2560×1600)的运行输出:

[[email protected] ~]$ emulator -avd N10APINew -verbose -scale .3 
emulator: found SDK root at /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit 
emulator: Android virtual device file at: /home/rajeesh/.android/avd/N10APINew.ini 
emulator: virtual device content at /home/rajeesh/.android/avd/N10APINew.avd 
emulator: virtual device config file: /home/rajeesh/.android/avd/N10APINew.avd/config.ini 
emulator: using core hw config path: /home/rajeesh/.android/avd/N10APINew.avd/hardware-qemu.ini 
emulator: Found AVD target API level: 16 
emulator: 'magic' skin format detected: 2560x1600 
emulator: autoconfig: -skin 2560x1600 
emulator: autoconfig: -skindir (null) 
emulator: keyset loaded from: /home/rajeesh/.android/default.keyset 
emulator: found SDK root at /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit 
emulator: trying to load skin file '/media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/tools/lib/emulator/skins/dynamic//layout' 
emulator: loaded dynamic skin width=2560 height=1600 bpp=16 

emulator: autoconfig: -kernel /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/system-images/android-16/armeabi-v7a//kernel-qemu 
emulator: autoconfig: -ramdisk /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/add-ons/addon-google_apis-google-16/images/armeabi-v7a//ramdisk.img 
emulator: Using initial system image: /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/add-ons/addon-google_apis-google-16/images/armeabi-v7a//system.img 
emulator: autoconfig: -data /home/rajeesh/.android/avd/N10APINew.avd/userdata-qemu.img 
emulator: autoconfig: -initdata /home/rajeesh/.android/avd/N10APINew.avd/userdata.img 
emulator: autoconfig: -cache /home/rajeesh/.android/avd/N10APINew.avd/cache.img 
emulator: Physical RAM size: 1024MB 

Content of hardware configuration file: 
    hw.cpu.arch = arm 
    hw.cpu.model = cortex-a8 
    hw.ramSize = 1024 
    hw.screen = touch 
    hw.mainKeys = no 
    hw.trackBall = no 
    hw.keyboard = yes 
    hw.keyboard.lid = no 
    hw.keyboard.charmap = qwerty2 
    hw.dPad = no 
    hw.gsmModem = yes 
    hw.gps = yes 
    hw.battery = yes 
    hw.accelerometer = yes 
    hw.audioInput = yes 
    hw.audioOutput = yes 
    hw.sdCard = no 
    disk.cachePartition = yes 
    disk.cachePartition.path = /home/rajeesh/.android/avd/N10APINew.avd/cache.img 
    disk.cachePartition.size = 66m 
    hw.lcd.width = 2560 
    hw.lcd.height = 1600 
    hw.lcd.depth = 16 
    hw.lcd.density = 320 
    hw.lcd.backlight = yes 
    hw.gpu.enabled = yes 
    hw.camera.back = none 
    hw.camera.front = none 
    vm.heapSize = 128 
    hw.sensors.proximity = no 
    hw.sensors.magnetic_field = yes 
    hw.sensors.orientation = yes 
    hw.sensors.temperature = yes 
    hw.useext4 = no 
    kernel.path = /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/system-images/android-16/armeabi-v7a//kernel-qemu 
    kernel.parameters = android.checkjni=1 

    disk.systemPartition.initPath = /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/add-ons/addon-google_apis-google-16/images/armeabi-v7a//system.img 
    disk.systemPartition.size = 200m 
    disk.dataPartition.path = /home/rajeesh/.android/avd/N10APINew.avd/userdata-qemu.img 
    disk.dataPartition.size = 200m 
    avd.name = N10APINew 
. 
QEMU options list: 
emulator: argv[00] = "/home/rajeesh/droid-kit/tools/emulator-arm" 
emulator: argv[01] = "-android-hw" 
emulator: argv[02] = "/home/rajeesh/.android/avd/N10APINew.avd/hardware-qemu.ini" 
Concatenated QEMU options: 
/home/rajeesh/droid-kit/tools/emulator-arm -android-hw /home/rajeesh/.android/avd/N10APINew.avd/hardware-qemu.ini 
emulator: registered 'boot-properties' qemud service 
emulator: nand_add_dev: system,size=0xc800000,initfile=/media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/add-ons/addon-google_apis-google-16/images/armeabi-v7a//system.img 
emulator: mapping 'system' NAND image to /tmp/android-rajeesh/emulator-Tt0j9K 
emulator: rounding devsize up to a full eraseunit, now c810000 

emulator: nand_add_dev: userdata,size=0xc800000,file=/home/rajeesh/.android/avd/N10APINew.avd/userdata-qemu.img 
emulator: rounding devsize up to a full eraseunit, now c810000 

emulator: registered 'boot-properties' qemud service 
emulator: Adding boot property: 'dalvik.vm.heapsize' = '128m' 
emulator: Adding boot property: 'qemu.sf.lcd_density' = '320' 
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0' 
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'none' 
emulator: nand_add_dev: cache,size=0x4200000,file=/home/rajeesh/.android/avd/N10APINew.avd/cache.img 
emulator: Initializing hardware OpenGLES emulation support 
failed to create drawable 
Failed to load libGL.so 
error libGL.so: cannot open shared object file: No such file or directory 
failed to create drawable 
Failed to load libGL.so 
error libGL.so: cannot open shared object file: No such file or directory 
emulator: Kernel parameters: qemu.gles=1 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=1 
emulator: Trace file name is not set 

emulator: Could not open file: (null)/system/build.prop: No such file or directory 
emulator: control console listening on port 5554, ADB on port 5555 
emulator: sent '0012host:emulator:5555' to ADB server 
emulator: ping program: /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/tools/ddms 
emulator: ping command: /media/45d0873a-eafc-43a5-bcd8-6d674ae690c8/droid-kit/tools/ddms ping emulator 22.2.1.0 "Mesa Project" "Software Rasterizer" "2.1 Mesa 7.9" 
failed to create drawable 
failed to create drawable 
failed to create drawable 
failed to create drawable 
failed to create drawable 
failed to create drawable 
failed to create drawable 
failed to create drawable 
failed to create drawable 
[2]+ Done     android avd 
Segmentation fault (core dumped) 
[[email protected] ~]$ 
+0

您尝试删除并重新创建AVD吗? – Raptor

+0

是的。新创建的AVD也具有相同的行为方式。 – Rajeesh

回答

0

不幸的是,你不能甚至与谷歌API的模拟器测试谷歌地图API V2,虽然有些人已经做了look here.我试过配置模拟器谷歌地图,但无法做到这一点。使用google api的作品在仿真器上捆绑的地图应用程序,但其他地图相关的应用程序却没有。

最简单的事情就是在实际的硬件中进行测试。

+0

感谢您的回复,@Subash。更新之前,我可以通过谷歌apis在模拟器中打开APK。但现在,问题不在于该应用是否适用于该应用,而是仿真器本身已停止工作。无论如何,同意我应该在真实的硬件上测试它。 – Rajeesh