Ubuntu - Error: Failed to create the SD card

后端 未结 18 3060
暖寄归人
暖寄归人 2020-12-22 17:42

I see a lot of posts about writing to the SD card, but I believe my problem is different. I am unable to create the SD card during the process of building an AVD.

I

相关标签:
18条回答
  • 2020-12-22 18:02

    After a lot of installing and not getting any result I found this and it worked.

    This happens because some executable files in sdk/tools cannot be executed. Go to your Android Studio and Android SDK folders and make all directory and files executable by this command:

    chmod +x -R *
    
    0 讨论(0)
  • 2020-12-22 18:03

    If you are using Kali, Debian Jessie (or Ubuntu 13.10+), try

    sudo apt-get install lib32stdc++6

    instead of the ia32-libs mentioned above.

    0 讨论(0)
  • 2020-12-22 18:06
    sudo apt-get install lib32stdc++6
    

    After this you might get following errors

    Cannot launch AVD in emulator.
    Output:
    libGL error: unable to load driver: i965_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: i965
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
    X Error of failed request:  GLXBadContext
      Major opcode of failed request:  154 (GLX)
      Minor opcode of failed request:  6 (X_GLXIsDirect)
      Serial number of failed request:  49
      Current serial number in output stream:  48
    libGL error: unable to load driver: i965_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: i965
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
    X Error of failed request:  GLXBadContext
      Major opcode of failed request:  154 (GLX)
      Minor opcode of failed request:  6 (X_GLXIsDirect)
      Serial number of failed request:  49
      Current serial number in output stream:  48
    libGL error: unable to load driver: i965_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: i965
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
    emulator: WARNING: VM heap size set below hardware specified minimum of 228MB
    X Error of failed request:  BadValue (integer parameter out of range for operation)
    emulator: WARNING: Setting VM heap size to 384MB
      Major opcode of failed request:  154 (GLX)
      Minor opcode of failed request:  24 (X_GLXCreateNewContext)
      Value in failed request:  0x0
      Serial number of failed request:  33
      Current serial number in output stream:  34
    QObject::~QObject: Timers cannot be stopped from another thread
    

    Use these 3 commands to solve those

    mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6{,.bak}
    mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6.0.18{,.bak}
    ln -s /usr/lib/libstdc++.so  ~/Android/Sdk/tools/lib64/libstdc++/**
    
    0 讨论(0)
  • 2020-12-22 18:08

    On debian testing, when i tried to run ./tools/mksdcards, i received the error:

    error while loading shared libraries: libstdc++.so.6: 
    cannot open shared object file: No such file or directory
    

    Installing lib32stdc++6 resolves the problem, and was possible to create the avd.

    0 讨论(0)
  • 2020-12-22 18:09
    alex@alex-desktop:~$ mksdcard 1024M ./sdcard.iso
    bash: /home/alex/android-sdk-linux_x86/tools/mksdcard: No such file or directory
    alex@alex-desktop:~$ sudo android create avd -n my_avd -t 1 -c 1024M
    

    I have found this problem & i find a way first:

    cd /home/alex/android-sdk-linux_x86/tools/
    

    then write this:

    sudo chmod 755 mksdcard
    mksdcard 1024M ./sdcard.iso
    sudo android create avd -n my_avd -t 1 -c 1024M
    

    it should work :)

    0 讨论(0)
  • 2020-12-22 18:10

    MyOS is Oracle Unbreakable Linux 6 - to solve this issue I had to install libstdc++-4.4.6-3.el6.i686 package.

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