Why My Java Files Is Opening In Encoded Format On Android Studio
Solution 1:
Your Build folder is corrupt you need to rebuild the project.
First things first
File->Invalidate caches/Restart
If this doesn't work try rebuilding your project
Build->Clean Project then Build->rebuild project
If still no luck? Close Android Studio Try these:
1: Clear Android Studio Cache Delete this folder C:\Users%username%.AndroidStudio4.0\system\caches Check if the problem is solved
2: Rebuild manually Delete this folder and try again C:\Users%username%\AndroidStudioProjects<project name>\app\build
Solution 2:
The encoding used to compile your project is specified in the build.gradle files. The default, which is used when no specific encoding is specified, is UTF-8. We strongly recommend you use UTF-8 encoding whenever possible. The Android development tools create UTF-8 encoded projects by default, the Android Gradle plugin uses UTF-8 by default, and Android Lint will warn whenever it encounters XML files that are not using UTF-8
Add this in your build.gradle
section.
android {
compileOptions.encoding = 'UTF-8'
...
}
OR
Then Clean-Rebuild-Restart
Post a Comment for "Why My Java Files Is Opening In Encoded Format On Android Studio"