I am new to android development and have hit my first error and can't seem to get around it. I have downloaded and installed android studio and java on my mac and a made a dummy app just to see it run in the simulator. The default hello world app runs fine but as soon as I add a .png file to my drawable folder, I get this error:
Error:Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/billy/Library/Android/sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 42
I few things to mention are that I only see one drawable folder, not the normal drawable-hdpi,mdpi, etc that I see in many tutorials.
Appreciate the help.
Well I figured out the problem..
Once I changed the .png back to a its original .jpeg extension my app ran fine. I guess AS is picky when changing the extension to the image files. Odd though when I changed it to .png and then viewed its info, it said it was indeed a portable network graphic so that is why I was confused. If someone could shed some light on what is going on here that would be great. I think the image file was a .jpeg all along that is why it was giving me "Not a PNG".
Cheers
This can happen when gradle fails to process resources. In your case it happened to be an invalid image file in the drawable folder, in my case it was an error in one of my XML layouts that Android Studio didn't pick up on
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With