Help us understand the problem. What is going on with this article?

AmazonEC2(AmazonLinux)をAndroidアプリのビルドサーバにするときにハマったこと

More than 3 years have passed since last update.

症状

gradleでビルドするときに、こんなエラーが出る

Thread(png-cruncher_19) has a null payload
java.io.IOException: Cannot run program "/usr/local/android-sdk-linux/build-tools/23.0.3/aapt": error=2, そのようなファイルやディレクトリはありません
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at com.android.builder.png.AaptProcess$Builder.start(AaptProcess.java:163)
        at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:106)
        at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, そのようなファイルやディレクトリはありません
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:187)
        at java.lang.ProcessImpl.start(ProcessImpl.java:134)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 4 more

Exception in thread "png-cruncher_16" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /usr/local/android-sdk-linux/build-tools/23.0.3/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
        at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
        at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
        at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)

原因

aaptが依存するミドルウェアがない

対策

sudo yum install glibc.i686
sudo yum install zlib.i686 libstdc++.i686 ncurses-libs.i686 libgcc.i686
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした