Reputation: 53
When I want to build the project using IntelliJ and Gradle I get two errors:
Execution failed for task ':javadoc'.
Javadoc generation failed.
and
error: unmappable character for encoding ASCII
W??hrung
Here I use the German Umlaut 'ä' on one of the file in the project.
Three of my work colleagues have exactly the same project using also IntelliJ and have the same setting in Preferences>Editor>File Encoding like i do. But the project is build successfully by my work colleagues.
I found a temporary solution to put the following lines in the build.gradle:
javadoc {
options.encoding = 'UTF-8'
}
Why I get the errors when I build the project?
Upvotes: 5
Views: 4478
Reputation: 91
If you generate your Javadocs with a Gradle Task your IntelliJ Configuration does not matter since Gradle only reads the Gradle Configuration (build.gradle). Therefore you have to set the file encoding in Gradle.
You may configure Gradle to always use UTF-8 -> Stackoverflow issue on how to set encoding to UTF-8
Upvotes: 3