我正在使用Robolectric而不使用maven来构建,这意味着我正在使用Robolectric-with-dependencies Jar。
我根据Robolectric网站上的说明进行了设置,但我仍然收到警告:无法找到Android SDK的路径“错误。我发现这个链接 (第一个答案)提到了问题来自哪里,但没有回答我如何解决这个问题。
我是新手,从未发布,因为我经常在浏览一段时间后找到解决方案,但是我没有找到解决方案的运气。 什么都有帮助。 谢谢。
I am using Robolectric without using maven to build, meaning I am using the Robolectric-with-dependencies Jar.
I set it up based on instructions on Robolectric's site, yet I am still getting the WARNING: Unable to find path to Android SDK" error. I found this link (the first answer) which mentions where the problem is coming from but doesn't answer how I can fix this problem.
I am new and never posted because I can usually find a solution after browsing for awhile, however I had no luck finding the solution. Anything would help. Thanks.
最满意答案
确保将ANDROID_HOME环境变量设置为指向Android SDK安装,例如:
export ANDROID_HOME=/usr/local/Cellar/android-sdk/r15make sure to set the ANDROID_HOME environment variable to point to your Android SDK installation, e.g.:
export ANDROID_HOME=/usr/local/Cellar/android-sdk/r15更多推荐
发布评论