実現したいこと
-実機(アンドロイドスマホ)にビルドする。
前提
Unityで、アンドロイド用のゲームを製作したが、ビルド時にいくつかのエラーが出る。もはやUnityでなくても実機にビルドできるなら何でもよくなってきている。
良い知恵をください。
発生している問題・エラーメッセージ
1:
Gradle failed to fetch dependencies.
Failed to run ‘C:\Users\user[プロジェクト名]\Temp\PlayServicesResolverGradle\gradlew.bat –no-daemon -b “C:\Users\user[プロジェクト名]\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle” “-PANDROID_HOME=C:/Users/user/Documents/2022.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK” “-PTARGET_DIR=C:\Users\user[プロジェクト名]\Assets\Plugins\Android” “-PMAVEN_REPOS=https://maven.google.com/;file:///C:/Users/user/[プロジェクト名]/Packages/com.google.play.games/Editor/m2repository” “-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:22.0.0;com.google.android.ump:user-messaging-platform:2.0.0;com.google.games:gpgs-plugin-support:0.11.01” “-PUSE_JETIFIER=1” “-PDATA_BINDING_VERSION=7.1.2″‘
stdout:
ERROR: JAVA_HOME is set to an invalid directory: C:/Users/user/Documents/2022.2.17f1/Editor/Unity.exe
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
2:
Resolution failed
Failed to fetch the following dependencies:
com.google.android.gms:play-services-ads:22.0.0
com.google.android.ump:user-messaging-platform:2.0.0
com.google.games:gpgs-plugin-support:0.11.01
試したこと
Gradleを再インストールや、VisualStadioの機能の確認、Unityのバージョンアップと再インストールを行った。

回答1件
あなたの回答
tips
プレビュー