In the beta version of Android Studio 3 it seems that the androidManifest file is encoded forcefully into UTF-8 even if UTF-16 is stated in the header. Is this a bug or is t
The app build process using gradle in Android Studio 3 (beta and RC-1) is using aapt2.
I compared the AndroidManifest.xml generated by the Android Studio 2.x (gradle version 2.3.x) and Adnroid Studio 3 Beta and RC-1 (gradle version 4.1). The result of the comparison is that with Android Studio 2.x the manifest encoding is UTF-16LE
and with Android Studio 3 and the new tools, it is UTF-8
... which happens to be the opposite of what you mentioned in the question above.
Using android.enableAapt2=false
in the gradle.properties
file, results in the build system using the old aapt.
More info: https://developer.android.com/studio/build/gradle-plugin-3-0-0.html
UPDATE:
There is this tweet from yesterday (Oct 23rd) (https://twitter.com/the_very/status/922564040961826816):
add
systemProp.file.encoding=UTF-8
togradle.properties
to fix all encoding problems in both local and server builds
It does work for me. I hope it helps you too.