Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':app:greendao' - UnsupportedEncodingException: UTF- #1121

Open
Dhy521 opened this issue Sep 29, 2024 · 3 comments

Comments

@Dhy521
Copy link

Dhy521 commented Sep 29, 2024

Execution failed for task ':app:greendao'.

java.io.UnsupportedEncodingException: UTF-
微信截图_20240929133439

May I ask how to solve this problem
I have tried many solutions, but none of them are feasible

@greenrobot-team
Copy link
Collaborator

My guess is that the default encoding of the platform you are working on is not set correctly.

Maybe try to set the encoding for this project via Gradle options. Something like:

tasks.withType<JavaCompile> {
    // Note: Gradle defaults to the platform default encoding, make sure to always use UTF-8 for UTF-8 tests.
    options.encoding = "UTF-8"
}

Note: This project is not longer actively maintained. If you are looking for an easy to use and efficient database solution, please check out our other project ObjectBox.

@Dhy521
Copy link
Author

Dhy521 commented Oct 28, 2024

您的这个方案我已经尝试了 还是不可行 但是我的同事们就可以正常运行 您还有其他的方案吗

Translation: I've tried your solution and it still doesn't work, but my colleagues can run it normally. Do you have any other solutions?

@greenrobot-team greenrobot-team changed the title UTF- Execution failed for task ':app:greendao' - UnsupportedEncodingException: UTF- Oct 28, 2024
@greenrobot-team
Copy link
Collaborator

I just realized the issue is with the greendao task. I guess you should check that the encoding for the JVM used to run Gradle has UTF-8 configured as its encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants