LoginSignup
1
1

More than 5 years have passed since last update.

brew で android sdk を入れたときの ANDROID_HOME 設定

Posted at

理由とかいまいち分からなかったのですが、解決したのでメモ

課題

参戦しようと思った Android のプロジェクトで

./gradelew

をしたら、

java.lang.RuntimeException: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

が出てしまった。

sdk のディレクトリ指定が足りないのかと思い、適当に

export ANDROID_HOME=$(pwd)

とかするが、今度は

failed to find target with hash string 'android-24'

と出てしまう

とりあえず解決した方法

export ANDROID_HOME=$( brew --prefix android-sdk )

をしたら解消しました。

1
1
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
1
1