问题
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.
回答1:
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
回答2:
Stefan is correct.
More information can be found in my chapter about Android development with Maven as well as the plugin wiki and documentation for the sdk configuration. I would also recommend to use the latest version of the android maven plugin as well as the Android SDK..
来源:https://stackoverflow.com/questions/9352903/robolectric-warning-unable-to-find-path-to-android-sdk