LoginSignup
1
0

More than 3 years have passed since last update.

[Unity] Prime31(ios)でのandroidのビルドエラー

Last updated at Posted at 2021-01-06

状況

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ファイルを変更してもビルド時に元通りになってしまう。

似たビルドエラー

【Unity】Androidビルドでエラー"maxAspectRatio not found"

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0