Robolectric“警告:无法找到Android SDK的路径”(Robolectric “WARNING: Unable to find path to Android SDK”)

编程入门 行业动态 更新时间:2024-10-27 20:36:26
Robolectric“警告:无法找到Android SDK的路径”(Robolectric “WARNING: Unable to find path to Android SDK”)

我正在使用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/r15

make 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

更多推荐

本文发布于:2023-08-06 12:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1448494.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:路径   SDK   Android   Robolectric   path

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!