Gradle Build Failed #4966
-
Operating SystemWindows 11 Android Studio VersionFlamingo Stable Release RAM size8 GB Free disk space44 GB Which step are you stuck on?I cloned the repo and followed the instructions as mentioned in the installation guide. But the build failed. By default, the project was using a JDK called azul-15 (C:\Users\sivam.jdks\azul-15.0.10) which got installed at the same time the project was cloned. The build failed with multiple errors. The guide instructs using Java 8. I downloaded Java 8u202 from the Oracle website and configured it in the IDE: I set the same JDK in the PATH and JAVA_HOME environment variables as well. When I rebuilt the project multiple errors of the same type (inferable from the error log) remained. I found a possible solution in StackOverflow, but it requires modifying the module-level gradle file. Can someone developing on Windows help me out? Note: Android Studio also warned that the project is using a very old AGP version (3.6.1) which will not be supported in future Android Studio releases. It suggested upgrading AGP to at least version 4.0.0. Error LogC:\Users\sivam\AndroidStudioProjects\oppia-android\model\build\generated\source\proto\main\java\org\oppia\android\app\model\OppiaLanguage.java:25: error: unmappable character for encoding Cp1252
* Corresponds to the Arabic (اَلْعَرَب�?يَّة�?) macro language. IETF BCP 47 language tag: ar.
^
C:\Users\sivam\AndroidStudioProjects\oppia-android\model\build\generated\source\proto\main\java\org\oppia\android\app\model\OppiaLanguage.java:25: error: unmappable character for encoding Cp1252
* Corresponds to the Arabic (اَلْعَرَب�?يَّة�?) macro language. IETF BCP 47 language tag: ar.
^
C:\Users\sivam\AndroidStudioProjects\oppia-android\model\build\generated\source\proto\main\java\org\oppia\android\app\model\OppiaLanguage.java:41: error: unmappable character for encoding Cp1252
* Corresponds to the Hindi (हिन�?दी) macro language. IETF BCP 47 language tag: hi.
^
C:\Users\sivam\AndroidStudioProjects\oppia-android\model\build\generated\source\proto\main\java\org\oppia\android\app\model\OppiaLanguage.java:92: error: unmappable character for encoding Cp1252
* Corresponds to the Arabic (اَلْعَرَب�?يَّة�?) macro language. IETF BCP 47 language tag: ar.
^
C:\Users\sivam\AndroidStudioProjects\oppia-android\model\build\generated\source\proto\main\java\org\oppia\android\app\model\OppiaLanguage.java:92: error: unmappable character for encoding Cp1252
* Corresponds to the Arabic (اَلْعَرَب�?يَّة�?) macro language. IETF BCP 47 language tag: ar.
^
C:\Users\sivam\AndroidStudioProjects\oppia-android\model\build\generated\source\proto\main\java\org\oppia\android\app\model\OppiaLanguage.java:108: error: unmappable character for encoding Cp1252
* Corresponds to the Hindi (हिन�?दी) macro language. IETF BCP 47 language tag: hi.
^ Approaches already used to resolve the issueNo response Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hello @siva-subramaniam-v, Can you try to Invalidate cache and restart in Android studio. Or re-clone the project in your local. I think you missing something initially. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Please refer to #4984 (comment) |
Beta Was this translation helpful? Give feedback.
-
Important to note that while this message will commonly show up while building on windows, the project should still build correctly. |
Beta Was this translation helpful? Give feedback.
In Android Studio, the default file encoding can be determined by the operating system's default encoding. Android Studio follows the default encoding set by the underlying platform to handle file encoding for various operations, such as reading and writing files.
On different operating systems, the default file encoding may vary:
Windows: The default file encoding on Windows is typically Cp1252 (also known as Windows-1252).
macOS: The default file encoding on macOS is usually UTF-8.
Linux: On Linux distributions, the default file encoding can vary depending on the distribution and system configuration. However, UTF-8 is widely used and often set as the default encoding.
You can change yo…