コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】[BT:1.5.0] Error: null

概要

bundletool failed: Failed to run 'XXXX/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -jar "YYYY\Assets\GooglePlayPlugins\com.google.android.appbundle\Editor\Tools\bundletool-all.jar" build-bundle --overwrite --config="ZZZZ\AppData\Local\Temp\BundleConfig.json" --modules=ZZZZ\AppData\Local\Temp\play-unity-build\r5jb5k92.j5e\base\base.zip --output="" --metadata-file=com.android.tools.build.libraries/dependencies.pb:ZZZZ\AppData\Local\Temp\play-unity-build\r5jb5k92.j5e\base\source\BUNDLE-METADATA\com.android.tools.build.libraries\dependencies.pb'
stdout:

stderr:
[BT:1.5.0] Error: null
java.lang.NullPointerException
    at java.nio.file.Files.provider(Files.java:97)
    at java.nio.file.Files.notExists(Files.java:2434)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.execute(BuildBundleCommand.java:260)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:71)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)

exit code: 1

UnityEngine.Debug:LogError (object)
Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder:DisplayBuildError (string,string) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AppBundleBuilder.cs:762)
Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder:CreateBundle (string,Google.Android.AppBundle.Editor.AssetPackConfig) (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AppBundleBuilder.cs:297)
Google.Android.AppBundle.Editor.Internal.BuildTools.AppBundleBuilder/<>c__DisplayClass45_0:<CreateBundleAsync>b__0 () (at Assets/GooglePlayPlugins/com.google.android.appbundle/Editor/Scripts/Internal/BuildTools/AppBundleBuilder.cs:342)
System.Threading.ThreadHelper:ThreadStart ()
  • Play Asset Delivery を使用して .aab をビルドしようとしたら
    上記のエラーが発生する現象に遭遇
  • google-play-plugins-1.4.0.unitypackage ではなく
    google-play-plugins-1.3.0.unitypackage を使用するようにしたら
    エラーが発生しなくなった
  • https://github.com/google/play-unity-plugins/releases