When I was building the android app, I got an unfamiliar error.
Process 'command 'C:\Users\XXXXXXXXXX\AppData\Local\Android\Sdk\build-tools\24.0.2\aapt.exe'' finished with non-zero exit value 1
I found that the exit code when I ran aapt.exe was not 0, but when I searched for the error, I couldn't find any more logs.
After investigating, it seems that if you use something called Gradle, you can get a detailed log. (Gradle is a build automation system written in Groovy) So, I tried to install Gradle by referring to the following.
Referenced article: [Java] Gradle installation and basic usage (explained with images)
Check if it is installed.
C:\Users\XXXXXXXX>gradle -v
------------------------------------------------------------
Gradle 3.2.1
------------------------------------------------------------
Build time: 2016-11-22 15:19:54 UTC
Revision: 83b485b914fd4f335ad0e66af9d14aad458d2cc5
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.7.0_80 (Oracle Corporation 24.80-b11)
OS: Windows 8.1 6.3 amd64
Now that Gradle is installed, run the following to check the log.
C:\Users\XXXXXX\AndroidStudioProjects\DataBaseApp2>gradlew assembleDebug --info
……………
Successfully started process 'command 'C:\Users\XXXXXXX\AppData\Local\Android\Sdk\build-tools\24.0.2\aapt.exe''
C:\Users\XXXXXXX\AndroidStudioProjects\DataBaseApp2\app\src\main\res\layout\activity_main.xml:25:32-40: AAPT: String types not allowed (at 't
extColor' with value ' #F5F5F5').
C:\Users\XXXXXXX\AndroidStudioProjects\DataBaseApp2\app\build\intermediates\res\merged\debug\layout\activity_main.xml:18: error: Error: Strin
g types not allowed (at 'textColor' with value ' #F5F5F5').
There is a space in the color code ...! !! !! So I deleted it and rebuilt it.
Referenced article: Corrective action for error Unsupported major.minor version 52.0
Java version in Android Studio
Recommended Posts