スキップしてメイン コンテンツに移動

投稿

ラベル(build fail)が付いた投稿を表示しています

Unity 2021.3.3f1でのAndroidビルド失敗

事象 下記のエラーが出てAndroidビルドに失敗。他にもエラー出ていたが下記のエラーが根本原因。 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':launcher:mergeReleaseNativeLibs'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > More than one file was found with OS independent path 'lib/arm64-v8a/libopenxr_loader.so'. If you are using jniLibs and CMake IMPORTED targets, see <https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake> * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at <https://help.gradle.org> BUILD FAILED in 24s 重要なのは、 「More than one file was found with OS independent path ‘lib/arm64-v8a/libopenxr_loader.so’」 の部分。 どうもlibopenxr_loader.soがビルド時に複数参照されていることが原因のよう。libopenxr_loader.soファイル自体はOpen XRプラグインに含まれている。