Can't start Flutter app with API 16 and API 19

0

My goal is to support Android 4.1 (custom phone for security guard) with 512 MB - 1 GB of RAM.

What I've tried:

  1. I've tried with Android API 25 and Android API 29 (Google Play), it works as expected.

I am not sure whether this is the culprit or not but the APIs have 2 different APIs:

  1. API 16 and API 19 uses Google APIs.
  2. API 25 and API 29 uses Google Play.

This is the flutter doctor -v output:

It shows the Flutter and the Dart plugin are not installed in Android Studio 4.1.0, I double check and reinstall the plugins. The output does not change.

[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19041.746], locale en-ID)
    • Flutter version 1.22.6 at C:\Users\jason\Desktop\GitHub\src\flutter
    • Framework revision 9b2d32b605 (3 weeks ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5


[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\jason\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:\Users\jason\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[!] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.53.0)
    • VS Code at C:\Users\jason\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.19.0

[√] Connected device (1 available)
    • emulator-5554 (mobile) • emulator-5554 • android-x86 • Android 4.1.2 (API 16) (emulator)

! Doctor found issues in 1 category.

What I did:

  1. Follow the getting started tutorial
  2. Tried to run Flutter app in Android API 16 (Google APIs) and API 19 (Google APIs) it does not log any error, the app just close right away.
Launching lib\main.dart on emulator-5554 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
E/flutter ( 2544): [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(72)] Failed to setup Skia Gr context.
Waiting for emulator-5554 to report its views...
Debug service listening on ws://127.0.0.1:65520/peP2Hld3Hu4=/ws
Syncing files to device emulator-5554...
F/libc    ( 2544): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 2560 (1.raster)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'generic_x86/google_sdk_x86/generic_x86:4.1.2/MASTER/eng.wdu.20191213.040452:eng/test-keys'
pid: 2544, tid: 2560, name: 1.raster  >>> com.example.satpam <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000008
    eax 00000000  ebx 8e9c4920  ecx fffffff9  edx 00000000
    esi 00000000  edi 00000004
    xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
    eip 8e312de5  ebp 8cd42348  esp 8cd42348  flags 00010286
backtrace:
    #00  pc 00240de5  /data/data/com.example.satpam/lib/libflutter.so
    #01  pc 00259674  /data/data/com.example.satpam/lib/libflutter.so
    #02  pc 002e158f  /data/data/com.example.satpam/lib/libflutter.so
    #03  pc 004b4ad4  /data/data/com.example.satpam/lib/libflutter.so
    #04  pc 004b49a6  /data/data/com.example.satpam/lib/libflutter.so
    #05  pc 004b4e94  /data/data/com.example.satpam/lib/libflutter.so
    #06  pc 004b4c80  /data/data/com.example.satpam/lib/libflutter.so
    #07  pc 0006a3b6  /data/data/com.example.satpam/lib/libflutter.so
    #08  pc 0006b00b  /data/data/com.example.satpam/lib/libflutter.so
    #09  pc 0006be33  /data/data/com.example.satpam/lib/libflutter.so
    #10  pc 00018f9c  /data/data/com.example.satpam/lib/libflutter.so
    #11  pc 0006a8e5  /data/data/com.example.satpam/lib/libflutter.so
    #12  pc 0006a64d  /data/data/com.example.satpam/lib/libflutter.so
    #13  pc 00078770  /data/data/com.example.satpam/lib/libflutter.so
    #14  pc 0001f390  /data/data/com.example.satpam/lib/libflutter.so
    #15  pc 00021ee6  /data/data/com.example.satpam/lib/libflutter.so
    #16  pc 00021df7  /data/data/com.example.satpam/lib/libflutter.so
    #17  pc 0002857f  /data/data/com.example.satpam/lib/libflutter.so
    #18  pc 000285ad  /data/data/com.example.satpam/lib/libflutter.so
    #19  pc 000238f1  /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+33)
    #20  pc 0002554f  /system/lib/libutils.so (android::Looper::pollInner(int)+527)
    #21  pc 00025acb  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+43)
    #22  pc 0000b554  /system/lib/libandroid.so (ALooper_pollOnce+100)
    #23  pc 000284bc  /data/data/com.example.satpam/lib/libflutter.so
    #24  pc 00021da5  /data/data/com.example.satpam/lib/libflutter.so
    #25  pc 000218fd  /data/data/com.example.satpam/lib/libflutter.so
    #26  pc 00025a2e  /data/data/com.example.satpam/lib/libflutter.so
    #27  pc 000106d0  /system/lib/libc.so (__thread_entry+240)
    #28  pc 00019295  /system/lib/libc.so
    #29  pc 0005442b  /data/data/com.example.satpam/lib/libflutter.so
    #30  pc 00008261  /data/data/com.example.satpam/lib/libflutter.so
    #31  pc 0000bf36  /data/data/com.example.satpam/lib/libflutter.so
stack:
         8cd42308  8cd42328  [stack:2560]
         8cd4230c  8e0d3931  /data/data/com.example.satpam/lib/libflutter.so
         8cd42310  00000000  
         8cd42314  00000000  
         8cd42318  00000000  
         8cd4231c  00000000  
         8cd42320  00000000  
         8cd42324  00000000  
         8cd42328  00000000  
         8cd4232c  00000000  
         8cd42330  00000000  
         8cd42334  00000000  
         8cd42338  00000000  
         8cd4233c  00000000  
         8cd42340  8cd42378  [stack:2560]
         8cd42344  8e9c4920  /data/data/com.example.satpam/lib/libflutter.so
    #00  8cd42348  8cd423b8  [stack:2560]
         8cd4234c  8e32b674  /data/data/com.example.satpam/lib/libflutter.so
    #01  8cd42350  00000000  
         8cd42354  8cd42558  [stack:2560]
         8cd42358  b93886a0  [heap]
         8cd4235c  8e32b65f  /data/data/com.example.satpam/lib/libflutter.so
         8cd42360  41200000  
         8cd42364  41200000  
         8cd42368  8cd42378  [stack:2560]
         8cd4236c  8be25b0e  /system/lib/egl/libEGL_emulation.so (getEGLThreadInfo()+30)
         8cd42370  8be4eeb8  /system/lib/egl/libEGL_emulation.so
         8cd42374  8be4f060  /system/lib/egl/libEGL_emulation.so
         8cd42378  8cd42458  [stack:2560]
         8cd4237c  8be29e54  /system/lib/egl/libEGL_emulation.so (eglMakeCurrent+564)
         8cd42380  00000190  
         8cd42384  b9322040  [heap]
         8cd42388  b76db35b  /system/lib/libc.so (pthread_mutex_lock+11)
         8cd4238c  b7758f4c  /system/lib/libc.so
         ........  ........
    #02  8cd423c0  00000000  
         8cd423c4  00000004  
         8cd423c8  b9330cb8  [heap]
         8cd423cc  8e3b3567  /data/data/com.example.satpam/lib/libflutter.so
         8cd423d0  b93350a8  [heap]
         8cd423d4  b92e82a0  [heap]
         8cd423d8  b76e3dfb  /system/lib/libc.so (dlfree+11)
         8cd423dc  8cfec65b  /data/data/com.example.satpam/lib/libflutter.so
         8cd423e0  00000000  
         8cd423e4  8e9c4920  /data/data/com.example.satpam/lib/libflutter.so
         8cd423e8  8cd424e8  [stack:2560]
         8cd423ec  8e586ad4  /data/data/com.example.satpam/lib/libflutter.so
Lost connection to device.
android
flutter
android-studio
asked on Stack Overflow Feb 9, 2021 by kidfrom

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0