MAC上使用maven打android的包,报错:No Android SDK path could be found. 解决办法

时间:2023-12-24 15:32:55

对android工程运行mvn compile出现如下信息:

No Android SDK path could be found. You may configure it in the pom using <sdk><path>...</path></sdk> or <properties><sdk.path>...</sdk.path></properties> or on command-line using -Dandroid.sdk.path=... or by setting environment variable ANDROID_HOME -> [Help 1]

解决办法:


编缉 /etc/launchd.conf ,如果没有就新建一个,添加下面的信息:

bixiaopengdeiMac:~ bixiaopeng$ cat /etc/launchd.conf
setenv ANDROID_HOME Users/bixiaopeng/software/adt-bundle-mac-x86_64-20131030
保存后重启电脑,再运行mvn compile就OK啦