I am using windows 8 as operating system.
I have a test method in Robolectric which has € in method name. When I run the test using Gradle wrapper in Android studio with gradlew test command,
it is showing me following error:
error: illegal character: \172
public void change_Ôé¼10() {
^
2 errors
:client:compileTestDebugJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':client:compileTestDebugJava'.
> Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
BUILD FAILED
I have researched about it and found out it could be related to encoding to UTF-8 It seems I need to use it without BOM:
Illegal Character when trying to compile java code
Android Project Compiled with Ant doesn't compile, Illegal Character Error
But I do not know how to fix it in a proper way exactly. Do you have any suggestion to fix in Android studio terminal?
Addenda: A friend of mine who uses Linux has no problem to run the test.