0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Oculus Developer Hub をインストール後、Unity の Build And Run が失敗する

Posted at

Oculus Developer Hub(以下ODH)をインストールした後から、Unity での Build And Run が失敗するようになってしまったときの対応方法です。

原因

ODH には adb が付属しています。ODH の adb が起動されていると、Unity のほうの adb が同じポート使えないのが原因で正常に起動せず、インストールに失敗します。

エラー内容

Unity で Build And Run をすると ADB server が起動できなかったとエラーが出るようになってしまった。
2021-03-17_11h51_13.png

ターミナルで adb devices するもエラー

👉 adb devices
List of devices attached
adb server version (41) doesn't match this client (40); killing...
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

対応方法

  1. adb の場所を調べる。 adb --version 使うと path が表示されるの楽です。 (下の参考を参照)
  2. ODH の設定変更して、ODH を再起動
3. adb devices してみる。うまくいっていれば正常にデバイスが表示されるはず。
👉 adb devices
List of devices attached
1WMHH810D10407  device

参考

adb のパス表示

👉 adb --version
Android Debug Bridge version 1.0.40
Version 4986621
Installed as C:\Program Files\Unity\Hub\Editor\2019.4.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe

書いてある

注: ODHにはADBがバンドルされているため、自分でADBバージョンをインストールする必要はありません。ただし、コンピューター上で既に別のADBバージョンを実行している場合は、ADBインスタンス間で競合が発生する可能性があります。その場合は、ADBパスを変更することで、コンピューターから既存のADBバージョンを使用することができます。[Settings (設定)]に移動し、コンピューター上にあるADBインスタンスをODHが使用できるように、ADBパスを変更します。"

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?