A reminder when an aapt.exe error occurs

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.

Install Gradle

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

Check the build log

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

A reminder when an aapt.exe error occurs
Collecting client information when an error occurs in a web application
I get an error when adding a dependency
What to do when a null byte error occurs
When using a list in Java, java.awt.List comes out and an error occurs
When an error occurs even though validation is not set
An error occurs when codedeploy-agent is installed in Ubuntu Server 20.04
Solution notes when an error occurs when downloading docker gpg using curl
[Unauthorized Operation] A memorandum because an error occurred when creating an EC2 instance.
What to do and how to install when an error occurs in DXRuby 1.4.7
What to do if an error occurs when nokogiri enters when bundle install
When deploying to Heroku, OpenApp causes an error
[Error resolution] Occurs when trying to build an environment for spring with docker
Rails <% = expression%> Why no error occurs when empty
Error 400 occurs when executing Query by specifying Japanese as a condition in SOQL
[No Method Error] Solution when new action occurs
Send an email when an ERROR level log occurs with the logback SMTP Appender
I got an error when I ran rake routes.
Let's create a TODO application in Java 12 Processing when a request comes in with an unused HttpMethod ・ Processing when an error occurs in the server
The story when the container does not start up with docker-compose up and an error occurs
I have a question. I get an error when playing a video in Listview on android.
I got an error when trying to install sbt to build a Scala development environment
Customize the display when an error such as 404 Not Found occurs in Spring Boot
When deleting a record with MySQL workbench, javax.persistence.EntityNotFoundException occurs
What to do if an ActionController :: UnknownFormat error occurs
When I bcrypt with node + docker, I got an error
Error ExecJS :: RuntimeUnavailable: What to do when it occurs
Error when using SnapKit
[Android] Why a conflict version error occurs when loading some library on the Android app side
[Unresolved] An exception occurs when an SSH connection is executed using JSch from a Java 6 application.
Error when bundle install
What to do if a SAX Parser error occurs when using Liferay 7 / DXP on AWS
Error when deploying EC2
[Rails 6] What to do when a missing a template error occurs after introducing haml [Super easy]
I got an error when using nextInt, nextLine and substring.
[Thymeleaf] Thinking when An error happened during template parsing appears
A memorandum when running Apache Maven on an in-house proxy
Resolve CreateProcess error = 206 when running Java in a Windows environment
A mistake made when displaying an image using Active Storage
A memo of the update command when npm install causes an error in GitHub Action etc.
What to do if an error occurs when doing npm install axios in React + Typescript project
What to do if an error occurs in VS Code when importing a django module or your own module installed by pip install