# Unity 2020 build Android redirect: https://app.gitbook.com/@fourdesire/s/sdk-health-check/unity-2019-to-2020 ###### tags: `android` ## 前言 Unity 升 2020 之後 build Android 有一些問題,各有對應的地方要修改,但是讓 unity 把全部 gradle 重新產一遍就可以全部解決 參考 PR: https://github.com/fourdesire/bedtime-client/compare/feature/0.6.0...feature/0.6.0-i-refine_android_gradle_template ## Problem 1  ref: https://answers.unity.com/questions/1802208/build-error-27.html For Unity 2021.1 and Android 10 I use mainTemplate.gradle for my project and here I changed to this: ``` aaptOptions { noCompress = ['.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ') ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~" } ``` from this: ``` aaptOptions { ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~" } ``` ## Problem 2  NOTE: 解到這個的時候試了把全部的 gradle 重新產一遍,問題就都解決了,就暫時沒繼續找每一個問題對應的地方了。
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up