Ubuntu - Error: Failed to create the SD card

后端 未结 18 3059
暖寄归人
暖寄归人 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 17:51

    As others have already written, the problem is that your Linux distro is a 64-bit one and, at present, Android Virtual Device (AVD) needs the x86 library to work correctly.

    Someone has suggested to install ia32-libs. However, in Ubuntu 14.04 LTS you won't find this library. I solved using these alternative libs: lib32z1, lib32ncurses5, lib32bz2-1.0 and lib32stdc++.

    sudo apt-get update
    sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++
    
    0 讨论(0)
  • 2020-12-22 17:54

    I had a different problem: platform-tools was in my path but tools was not. So, everything worked except that the SDCard image was not created. There was no notice of this when I created the avd in eclipse and the virtual device was created with a really small sd card causing it to constantly throw the media not available error on app install.

    0 讨论(0)
  • 2020-12-22 17:54

    Try moving the android sdk folder to home folder. It works.

    0 讨论(0)
  • 2020-12-22 17:55

    For the people who faced the same issue on windows. For me it was because mksdcard.exe tool was unable to run successfully. Some SDK tools such as mksdcard.exe require Microsoft Visual C++ runtime. So go to your System properties and check your System type:

    Then based on your system type,(for me it was x64) download/update the latest Microsoft Visual C++ Redistributable for Visual Studio 2019 from the link https://visualstudio.microsoft.com/downloads/

    After installing Microsoft Visual C++, my problem was fixed. I was able to create AVD successfully.

    0 讨论(0)
  • 2020-12-22 17:58

    In elementary OS and ubuntu, the solutions was to install the following packages

    sudo apt-get install lib32ncurses5 lib32z1
    sudo apt-get install libgcc1:i386
    
    0 讨论(0)
  • 2020-12-22 18:01

    I had the same error like you and I have just solved it, so maybe it can help you (though I don't think your error is caused by the same problem like me).

    I found that all tools in ../tools don't have the permission to excute, so I used

    chmod -R 777 ../tools
    

    from the command line and it finally works

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