Reputation: 169
I uploaded my code from my desktop computer to github, and when i pulled the code to my laptop (for the first time) i ran into this issue when i tried syncing my project with gradle files. I posted the error message printed below.
I am also unable to rebuild or clean the project. The java compiler also has trouble resolving the character "R", but i assume this is because i am unable to sync the project.
I appreciate the help!
Exception while processing task java.lang.RuntimeException: AAPT process not ready to receive commands
Thread(png-cruncher_25): Stream closed
java.io.IOException: Stream closed
at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
at java.io.OutputStream.write(OutputStream.java:116)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at com.android.builder.png.AaptProcess.shutdown(AaptProcess.java:143)
at com.android.builder.png.QueuedCruncher$1.destruction(QueuedCruncher.java:144)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:245)
at java.lang.Thread.run(Thread.java:745)
Upvotes: 1
Views: 1804
Reputation: 1835
Check if your aapt binary for your Build Tools version is working:
neonigma@hyperion ~/Android/Sdk/build-tools/23.0.3 $ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
If not as in my case, just install the missing lib:
neonigma@hyperion ~/Android/Sdk/build-tools/23.0.3 $ sudo apt-get install zlib1g:i386
Restart your Android Studio and try again.
EDIT:
If you don't have Linux or your problem is not related with the previous comment, try to change the Build tools version in the gradle file:
buildToolsVersion "23.0.3"
Upvotes: 1