Skip to content

Flutter should run on the Android emulator #284

Closed

Description

@FlutterIssues

Issue by IvBaranov
Saturday Nov 07, 2015 at 09:15 GMT
Originally opened as https://github.com/flutter/engine/issues/2010


Project that builds and deploys on real device does not run on emulators.

Emulator 64 arm log:

Log 1
11-07 12:05:41.464: D/PackageManager(421): Renaming /data/app/vmdl1070531467.tmp to /data/app/org.domokit.sky.shell-1
11-07 12:05:41.614: I/PackageManager(421): Running dexopt on: /data/app/org.domokit.sky.shell-1/base.apk pkg=org.domokit.sky.shell isa=arm vmSafeMode=false
11-07 12:05:41.828: I/dex2oat(1185): /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/org.domokit.sky.shell-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm/data@[email protected]@[email protected] --instruction-set=arm --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=10
11-07 12:05:51.455: V/BackupManagerService(421): restoreAtInstall pkg=org.domokit.sky.shell token=1 restoreSet=0
11-07 12:05:51.605: D/BackupManagerService(421): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:org.domokit.sky.shell flg=0x4000010 (has extras) }
11-07 12:05:52.059: W/PackageManager(781): Failure retrieving resources for org.domokit.sky.shell: Resource ID #0x0
11-07 12:05:52.059: W/PackageManager(781): Failure retrieving resources for org.domokit.sky.shell: Resource ID #0x0
11-07 12:05:54.717: I/ActivityManager(421): Force stopping org.domokit.sky.shell appid=10054 user=0: from pid 1196
11-07 12:05:57.787: I/ActivityManager(421): START u0 {act=android.intent.action.RUN dat=/data/data/org.domokit.sky.shell/dev.flx flg=0x10000000 cmp=org.domokit.sky.shell/.SkyActivity (has extras)} from uid 0 on display 0
11-07 12:05:57.811: V/WindowManager(421): addAppToken: AppWindowToken{3b7cafe3 token=Token{f296c12 ActivityRecord{1305cf9d u0 org.domokit.sky.shell/.SkyActivity t10}}} to stack=1 task=10 at 0
11-07 12:05:57.856: V/WindowManager(421): Adding window Window{a9b580c u0 Starting org.domokit.sky.shell} at 1 of 8 (after Window{1890d0ee u0 com.android.launcher/com.android.launcher2.Launcher})
11-07 12:05:58.204: I/ActivityManager(421): Start proc 1221:org.domokit.sky.shell/u0a54 for activity org.domokit.sky.shell/.SkyActivity
11-07 12:06:00.627: V/WindowManager(421): Adding window Window{33329ca4 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity} at 1 of 9 (before Window{a9b580c u0 Starting org.domokit.sky.shell})
11-07 12:06:00.923: V/WindowManager(421): Adding window Window{2da0fdc2 u0 SurfaceView} at 1 of 10 (before Window{33329ca4 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity})
11-07 12:06:01.232: I/ActivityManager(421): Displayed org.domokit.sky.shell/.SkyActivity: +3s301ms
11-07 12:06:14.263: I/DEBUG(63): pid: 1221, tid: 1239, name: gpu_thread  >>> org.domokit.sky.shell <<<
11-07 12:06:14.336: I/DEBUG(63):     #00 pc 0018abd0  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.338: I/DEBUG(63):     #01 pc 002170ab  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.338: I/DEBUG(63):     #02 pc 002174c7  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.339: I/DEBUG(63):     #03 pc 00217615  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.339: I/DEBUG(63):     #04 pc 00218edf  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.340: I/DEBUG(63):     #05 pc 0009eff7  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.340: I/DEBUG(63):     #06 pc 0021c5e7  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.341: I/DEBUG(63):     #07 pc 00095873  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.341: I/DEBUG(63):     #08 pc 00095d0d  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.342: I/DEBUG(63):     #09 pc 0009609d  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.343: I/DEBUG(63):     #10 pc 000afb8d  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.343: I/DEBUG(63):     #11 pc 000afc63  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.345: I/DEBUG(63):     #12 pc 00098c99  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.345: I/DEBUG(63):     #13 pc 000952a5  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.346: I/DEBUG(63):     #14 pc 0009f541  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:14.360: I/DEBUG(63):     #15 pc 0009ebb9  /data/app/org.domokit.sky.shell-1/lib/arm/libsky_shell.so
11-07 12:06:16.539: W/InputDispatcher(421): channel '33329ca4 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
11-07 12:06:16.542: E/InputDispatcher(421): channel '33329ca4 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
11-07 12:06:16.549: I/WindowState(421): WIN DEATH: Window{33329ca4 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity}
11-07 12:06:16.550: W/InputDispatcher(421): Attempted to unregister already unregistered input channel '33329ca4 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)'
11-07 12:06:16.551: W/WindowManager(421): Force-removing child win Window{2da0fdc2 u0 SurfaceView} from container Window{33329ca4 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity}
11-07 12:06:16.570: I/ActivityManager(421): Process org.domokit.sky.shell (pid 1221) has died
11-07 12:06:16.620: W/ActivityManager(421): Force removing ActivityRecord{1305cf9d u0 org.domokit.sky.shell/.SkyActivity t10}: app died, no saved state
Log 2
11-07 11:46:33.840 2362-2362/? I/art: Not late-enabling -Xcheck:jni (already on)
11-07 11:46:35.522 2362-2369/org.domokit.sky.shell W/art: Suspending all threads took: 16.475ms
11-07 11:46:35.623 2362-2362/org.domokit.sky.shell I/cr.library_loader: Time to load native libraries: 119 ms (timestamps 4455-4574)
11-07 11:46:35.626 2362-2362/org.domokit.sky.shell I/cr.library_loader: Expected native library version number "", actual native library version number ""
11-07 11:46:36.314 2362-2362/org.domokit.sky.shell E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
11-07 11:46:36.352 2362-2362/org.domokit.sky.shell W/art: Attempt to remove local handle scope entry from IRT, ignoring
11-07 11:46:36.517 2362-2369/org.domokit.sky.shell W/art: Suspending all threads took: 11.679ms
11-07 11:46:36.629 2362-2413/org.domokit.sky.shell D/OpenGLRenderer: Render dirty regions requested: true
11-07 11:46:36.645 2362-2362/org.domokit.sky.shell D/Atlas: Validating map...
11-07 11:46:37.155 2362-2413/org.domokit.sky.shell I/OpenGLRenderer: Initialized EGL, version 1.4
11-07 11:46:37.189 2362-2413/org.domokit.sky.shell D/OpenGLRenderer: Enabling debug mode 0
11-07 11:46:37.206 2362-2413/org.domokit.sky.shell W/EGL_emulation: eglSurfaceAttrib not implemented
11-07 11:46:37.206 2362-2413/org.domokit.sky.shell W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa57734c0, error=EGL_SUCCESS
11-07 11:46:37.360 2362-2362/org.domokit.sky.shell W/art: Attempt to remove local handle scope entry from IRT, ignoring
11-07 11:46:37.408 2362-2362/org.domokit.sky.shell I/Choreographer: Skipped 40 frames!  The application may be doing too much work on its main thread.
11-07 11:46:56.117 2362-2407/org.domokit.sky.shell I/chromium: [INFO:GrGLUtil.cpp(204)] nullptr GLSL version string.
11-07 11:46:56.121 2362-2407/org.domokit.sky.shell A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 2407 (gpu_thread)

Genymotion log (system_process):

11-07 04:09:50.404: W/ActivityManager(734): Invalid packageName: org.domokit.sky.shell
11-07 04:09:51.541: I/ActivityManager(734): START u0 {act=android.intent.action.RUN dat=/data/data/org.domokit.sky.shell/dev.flx flg=0x10000000 cmp=org.domokit.sky.shell/.SkyActivity (has extras)} from uid 0 on display 0

Shell process just does not appear.

Activity

  1. added this to the milestone on Dec 12, 2015
  2. eseidelGoogle commented on Feb 16, 2016

    @eseidelGoogle
    Contributor

    I suspect getting emulator support working is a small amount of plumbing (teaching the flutter command how it differs from a physical device, possibly generating android-intel, android-arm-32 engines, etc.) But it's not something we have on our schedule for the next few weeks. If someone would like to try themselves, we're happy to help in #flutter on freenode.

  3. eseidelGoogle commented on Feb 16, 2016

    @eseidelGoogle
    Contributor

    Looking at the crash log above, it looks like it may need some work in Skia (or more likely our handling of Skia):

    11-07 11:46:56.117 2362-2407/org.domokit.sky.shell I/chromium: [INFO:GrGLUtil.cpp(204)] nullptr GLSL version string.
    11-07 11:46:56.121 2362-2407/org.domokit.sky.shell A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 2407 (gpu_thread)
    

    Also, this log is from a very long time ago. Probably before we were using Skia's dynamic gpu bindings and had to teach our engine about every new gpu we were running on. That crash may very well be gone now.

  4. jason-simmons commented on Feb 23, 2016

    @jason-simmons
    Member

    I was able to run the Stocks example on the Android emulator using the tip-of-tree Flutter engine.
    The AVD configuration was Android 6.0/armeabi-v7a/Nexus 5 using the host GPU.

    It's very slow though. We should consider providing an x86 Android target for the engine that can run on the x86 KVM accelerated emulator.

  5. abarth commented on Jun 12, 2016

    @abarth
    Contributor

    This work now, including x86.

  6. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleplatform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions