简体   繁体   中英

Unity Android Build Error: > Illegal char <?> at index 7: ..\..\l?brary_man?fest\release\AndroidManifest.xml

I want to build my Unity project for Android. I use windows 10 Home Single Language unfortunately, I use it Turkish. I couldn't find any way to make display language English. As my research, that error occurs due to system language. Ref.:https://github.com/googleads/googleads-mobile-unity/issues/1106

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':unityLibrary:generateReleaseRFile'.

Illegal char at index 7: ....\\l?brary_man?fest\\release\\AndroidManifest.xml

Any idea how can I solve that issue?

I have talked to Unity support about this issue and they said it is a problem on gradle side and recommended me to switch my OS language to English, which solved the issue. You can do it on "All Settings > Time & Language > Language > Windows Display Language" to English. I also recommend changing Regional Format on Region tab to Turkey after language switch. I hope this will help you too.

我有同样的问题,如果你像我一样有 Windows 10 Single Language,你需要重新安装整个操作系统并将操作系统语言更改为英文

This is an issue with the Android Gradle Plugin. This issue will be fixed in 2020.1 but for people using 2019.3 or older and can't change their system language, here is a workaround I am using:

  • Install the newest version of gradle
  • Go to Preferences > External Tools > Android and de-select Gradle installed with Unity . Enter the path you installed gradle in previous step
  • Enable Player Settings > Publishing Settings > Build > Custom Base Gradle Template
  • Go to custom template ( Assets/Plugins/Android/baseProjectTemplate.gradle by default) and change plugin version to 3.5.0 . Note that 3.6+ versions have other bugs so I found that 3.5.0 works the best. It should look like this: classpath 'com.android.tools.build:gradle:3.5.0'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM