Cannot start Emulator in android studio 2.0

前端 未结 14 2107
渐次进展
渐次进展 2020-12-02 05:11

I just upgraded my android studio from 1.5 to 2.0.And now I am facing some weird bug when I try to start Emulator. I use Ubuntu 15.10 OS

Android monitor returns this

相关标签:
14条回答
  • 2020-12-02 05:43
    $ cd Android/Sdk/emulator/lib64/libstdc++
    $ mv libstdc++.so.6 libstdc++.so.6.bak
    $ ln -s /usr/lib64/libstdc++.so.6
    

    it's worked for me

    0 讨论(0)
  • 2020-12-02 05:44

    Verify that you have installed in your system lib64stdc++6

    With a 32 bits operating system :

    # apt-get install lib64stdc++6
    

    With a 64 bits operating system with multiarch enabled :

    # apt-get install lib64stdc++6:i386
    

    Then link the new installed libraries to the android sdk tools path

    $ cd $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
    $ mv libstdc++.so.6 libstdc++.so.6.bak
    $ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++
    

    EDIT: in 15.10 x64 with current Sdk (23), the folder is $ANDROID_HOME/Sdk

    0 讨论(0)
  • 2020-12-02 05:44

    Another solution for me was to use systems libraries:

    emulator -use-system-libs -avd YOUR_VIRTUAL_DEVICE_NAME

    0 讨论(0)
  • 2020-12-02 05:45

    Same problem for me on Ubuntu 16.04 LTS x64 with :

    • Android Studio 2.2.3
    • Android SDK Tools 25.2.4
    • Emulator version 25.2.4-3534729 (From Emulator > Extended Controls > Help > About)

    My graphic card is an AMD/ATI Radeon and I read from this thread on Android Open Source Project - Issue Tracker that :

    The root cause of the problem is likely that the Radeon GL driver library requires a more recent libstdc++.so than the one bundled with the emulator.

    Here's how I fixed the problem :

    1. Install lib64stdc++6

      $ sudo apt-get install lib64stdc++6:i386   
      
    2. Install mesa-demos

      $ sudo apt-get install mesa-utils
      
    3. Move libstdc++.so.6 out of the way by renaming it to libstdc++.so.6.bak

      $ cd ~/$ANDROID_HOME/Android/Sdk/tools/lib64/libstdc++
      $ mv libstdc++.so.6 libstdc++.so.6.bak
      
    0 讨论(0)
  • 2020-12-02 05:46

    I had the same issue on an Arch Linux box. I had to do two things to solve all the issues:

    1. Install mesa-demos. This is the Arch Linux package which contains glxinfo:

      $ sudo pacman -S mesa-demos
      
    2. Run the emulator with the -use-system-libs flag:

      $ emulator -avd <AVD name> -use-system-libs
      

      To enable this behavior in Android Studio, I set the ANDROID_EMULATOR_USE_SYSTEM_LIBS enviornment variable in ~/.zshrc.

      export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
      

      You can also set this in ~/.profile or ~/.bashrc. In all of these cases, you will have to start Android Studio from the command-line. Alternatively, you can set it in ~/.pam_environment to be able to start Android Studio from a desktop launcher:

      ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
      
    0 讨论(0)
  • 2020-12-02 05:48

    After doing the two steps above (posted by Giorgio Ghiatis), install mesa-utils if it is not installed.

    $ sudo apt-get install mesa-utils

    0 讨论(0)
提交回复
热议问题