Search code examples
android-emulator

Android apps worked in usb debugging but not in android emulator (white screen)


I run "ionic cordova run android" using visual studio code.. but the apps shows white screen in the emulator.. it display properly if using USB debugging.. the device also display properly if install using the apk.. the reason why I want to use emulator because I want to debug "http://10.0.2.2".. this is my emulator setting..

Emulator setting

Things that I have done is as per below

  1. Choose ANGLE (D3D11) for OpenGL ES Renderer at the emulator advance setting
  2. Choose Software - GLES 2.0 graphic for the Emulated Performance during create emulator
  3. Try both R and Q for the system image during create the virtual device
  4. Update the SDK based on the system image set at the emulator

System image selection


Solution

  • Issue

    • I compile the source code at different laptop (Laptop A) and it manage to display error at the web console using google inspect
    • it display "newtrustedfunctionforjit fn.bind is not a function"..

    Founding

    • the issue is related to the chrome version 83 and the browser need an upgrade to solve the issue
    • The emulator is not using a browser (it using web view) hence I cannot update the google version

    Solution

    • download new skin for newer android model into laptop A
    • download same skin on the laptop B (the laptop that I initially come with this post)

    Below is the explanation from GitHub for angular

    Explanation about the chrome issue

    Below is my new System Image

    • Release Name S
    • API Level 31
    • ABI x86_64
    • Target Android 12 (Google APIs)

    New System Image