質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
ARCore

ARCoreは、グーグル社が提供しているAndroid向けのAR(拡張現実)フレームワークです。スマホ内蔵のカメラとIMUセンサー(慣性計測装置)を使って、モーショントラッキングや水平面の検出、光源の推測を行い、ARを実現します。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Q&A

0回答

1381閲覧

【unity】build and runできない

tiharu

総合スコア0

ARCore

ARCoreは、グーグル社が提供しているAndroid向けのAR(拡張現実)フレームワークです。スマホ内蔵のカメラとIMUセンサー(慣性計測装置)を使って、モーショントラッキングや水平面の検出、光源の推測を行い、ARを実現します。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

0グッド

0クリップ

投稿2021/06/17 10:22

前提・実現したいこと

環境
windows10
unity2018.2.13f1

unityもteratailも初めたばかりです。初歩的な質問で大変恐縮なのですが
unityで実機でテストしようと、build and runするとエラーが出てしまいます。

エラーに至るまでに行ったこと

Window > Package Manger から Package Manager を起動して
Multiplayer HLAPIとXR Legacy Input Helpersをインストールする

以下のようなエラーはどうすれば解決しますか?

発生している問題・エラーメッセージ

エラー1
FAILURE: Build failed with an exception.

  • What went wrong:

A problem occurred configuring project ':launcher'.

Could not resolve all artifacts for configuration ':launcher:classpath'.
Could not resolve com.android.tools.build:gradle:3.4.0.

Required by: project :launcher > Could not resolve com.android.tools.build:gradle:3.4.0. > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'. > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  • 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.

BUILD FAILED in 895ms
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr)

エラー2
FAILURE: Build failed with an exception.

  • What went wrong:

A problem occurred configuring project ':launcher'.

Could not resolve all artifacts for configuration ':launcher:classpath'.
Could not resolve com.android.tools.build:gradle:3.4.0.

Required by: project :launcher > Could not resolve com.android.tools.build:gradle:3.4.0. > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'. > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  • 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.

BUILD FAILED in 895ms
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr)

エラー3
Build completed with a result of 'Failed' in 25 seconds (25026 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr)

エラー4
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in <e6522990dfdf40458abbd5eeeb595b91>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <e6522990dfdf40458abbd5eeeb595b91>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr)

該当のソースコード

ソースコード

試したこと

ここに問題に対して試したことを記載してください。

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

sakura_hana

2021/06/18 00:20

・エラー文を一部分ずつでググってください。例えば「Could not resolve all artifacts for configuration ':launcher:classpath'.」など。そして試したことを質問に追記してください。 ・空っぽのプロジェクトでBuild and Runするとどうなるか確認してみてください。(ビルド環境構築に失敗しているのか、プロジェクトの問題なのかの切り分けの為)
tiharu

2021/06/18 08:04

ありがとうございます。新しく試したことを追記しますと、Project Settings>Player>Other Settings>Scripting BackendをMonoからIL2CPP変更し、mainTemplate.gradleのdependenciesにclasspath 'com.android.tools.build:gradle:3.6.0.'と追記しましたが、どちらもダメでした... また、新しくunityのプロジェクトを作ってそのままBuild and Runした場合もエラーが出てしまうようでした。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問