因此,在Ubuntu 13.04 64位上在Android Studio 0.5.2上创建新项目并尝试在物理设备上运行时出现以下错误:
Information:/home/juan/Documents/android-studio/sdk/build-tools/android-4.4.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: Failed to run command:
/home/juan/Documents/android-studio/sdk/build-tools/android-4.4.2/aapt s -i
/home/juan/AndroidStudioProjects/MyApplication4/app/build/exploded-aar/com.android.support/appcompat-v7/19.0.1/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png -o /home/juan/AndroidStudioProjects/MyApplication4/app/build/res/all/debug/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png
Error Code:
127
Output:
/home/juan/Documents/android-studio/sdk/build-tools/android-4.4.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
我在MacBook Pro上有相同的设置(AS 0.5.2),Gradle成功完成,没有任何错误,所以一定有问题。我还必须安装32位版本的几个库才能让adb在我的64位Ubuntu上运行。也许那是怎么回事?任何帮助将不胜感激。
编辑还尝试安装以下库:
$sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
没有运气。
答案 0 :(得分:11)
通过重新安装来修复它
sudo apt-get install lib32z1 lib32z1-dev
非常感谢!
答案 1 :(得分:0)
我有一个64位的Ubuntu,我通过安装解决了这个问题 以下包
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6