Question

When we want to run an Android Project it gives me an error. Tthe error is java: 编码UTF-8的不可映射字符 , I don't know how to solve it,also we want to say the Project was programmer by someone else.

Was it helpful?

Solution

This happens when you use Chinese characters within your code, which cannot be resolved by the compiler. Add the above lines to build.gradle in your project solves the error.

tasks.withType(Compile) {
    options.encoding = "UTF-8"
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top