状況
UnityにPrime13(iOS : Etcetera Plugin)を追加した。
iosでのビルドは問題なくできたが、androidのビルド時にエラーが起きた
エラー内容
What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
Android resource linking failed
/Users/ユーザー名/Desktop/Unity/プロジェクト名/Temp/gradleOut/launcher/build/intermediates/merged_manifests/release/AndroidManifest.xml:52: AAPT: error: unexpected element found in .
解決法
プロジェクトファイル内の AndroidManifest.xml
のコードを変えた
(変更前)AndroidManifest.xml
<manifest>
<application android:label="@string/app_name" android:hasCode="false" android:debuggable="false">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
...
</application>
</manifest>
(変更後)AndroidManifest.xml
<manifest>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="@string/app_name" android:hasCode="false" android:debuggable="false">
...
</application>
</manifest>
注意点
プロジェクト名/Assets/Plugins/Android/AndroidManifest.xml
AndroidManifest.xml
のファイルを変更する。
エラーログにあるパスのAndroidManifest.xml
ファイルを変更してもビルド時に元通りになってしまう。