👓

Nreal(Xreal) Lightのビルドエラー解決方法

2023/12/28に公開

環境

  • os:macOS sonoma(14)
  • unity:2022.3.5f1

現象

  • 初めにここに従ってNreal開発環境を構築した。
  • その後Nrealのデモアプリをビルドしようとしたら以下のエラーが出た。
  • エラー文詳しく見たら↓が書いてあった。これに書いてある通りに対応すれば治った。具体的な治し方は以下に記載。  
    Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined.

治し方

  • Assets>Plugins>Android>AndroidManifest.xmlを開く
  • 6行目に以下のようにandroid:exported="true"を追加する。これでもう一度ビルドしたら無事ビルドが通った。
    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:exported="true">

Discussion