从 shell 和 sbt 在 android sdk 中运行 aapt 的程序
我有一个奇怪的问题,我无法从 sbt 命令以及 shell 运行 aapt。
我运行这个命令:
sbt update package-debug
一切都会嗡嗡作响,直到我收到此错误:
java.io.IOException: Cannot run program "/home/egervari/Programs/android-sdk-linux_x86/platforms/android-7/tools/aapt": java.io.IOException: error=2, No such file or directory
所以我尝试手动运行它,只是为了它:
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ./aapt
bash: ./aapt: No such file or directory
这很奇怪,因为它就在那里:
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ls -la
total 4660
drwxr-xr-x 3 egervari egervari 4096 2010-10-16 09:13 .
drwxr-xr-x 8 egervari egervari 4096 2010-10-16 09:13 ..
-rwxrwxrwx 1 egervari egervari 3472673 2010-10-16 09:13 aapt
-rwxrwxrwx 1 egervari egervari 1050328 2010-10-16 09:13 aidl
-rwxrwxrwx 1 egervari egervari 213690 2010-10-16 09:13 dexdump
-rwxrwxrwx 1 egervari egervari 2497 2010-10-16 09:13 dx
drwxr-xr-x 2 egervari egervari 4096 2010-10-16 09:13 lib
-rw-r--r-- 1 egervari egervari 10800 2010-10-16 09:13 NOTICE.txt
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$
帮助? :/
I have a weird problem where I cannot run aapt from an sbt command as well as from the shell.
I run this command:
sbt update package-debug
And everything hums along until I get this error:
java.io.IOException: Cannot run program "/home/egervari/Programs/android-sdk-linux_x86/platforms/android-7/tools/aapt": java.io.IOException: error=2, No such file or directory
So I try running it manually, just for the heck of it:
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ./aapt
bash: ./aapt: No such file or directory
This is pretty weird because it's right there:
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ls -la
total 4660
drwxr-xr-x 3 egervari egervari 4096 2010-10-16 09:13 .
drwxr-xr-x 8 egervari egervari 4096 2010-10-16 09:13 ..
-rwxrwxrwx 1 egervari egervari 3472673 2010-10-16 09:13 aapt
-rwxrwxrwx 1 egervari egervari 1050328 2010-10-16 09:13 aidl
-rwxrwxrwx 1 egervari egervari 213690 2010-10-16 09:13 dexdump
-rwxrwxrwx 1 egervari egervari 2497 2010-10-16 09:13 dx
drwxr-xr-x 2 egervari egervari 4096 2010-10-16 09:13 lib
-rw-r--r-- 1 egervari egervari 10800 2010-10-16 09:13 NOTICE.txt
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$
Help? :/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您似乎正在尝试在 64 位操作系统上运行 32 位二进制文件。也许您缺少所需的共享库。尝试运行
file aapt
和ldd ./aapt
看看它说了什么。如果是这种情况那么安装ia32-libs可以修复它,因为有没有可用的 64 位二进制文件。
It looks like you're trying to run a 32-bit binary on a 64-bit OS. Maybe you're missing the required shared libraries. Try running
file aapt
andldd ./aapt
to see what it says.If this is the case then installing ia32-libs could fix it, as there are no 64-bit binaries available.
ia32-libs 已弃用。
以下对我有用:
我在运行 aapt 时仍然遇到错误,所以我安装了这个:
现在工作完美。
ia32-libs is deprecated.
The following worked for me:
I was still getting error when running aapt, so I installed this:
works perfect now.