Reputation: 4180
I used
Robolectric 1.1 jar-with-dependencies
in my project and succeed to get it work, however when I changed the jar to
1.2-SNAPSHOT jar-with-dependencies
I get the following warning:
WARNING: Unable to find path to Android SDK
Upvotes: 2
Views: 1938
Reputation: 547
After I followed this tutorial, I had the same issue. This is how I solved it on my mac:
1- Add Android sdk dir to the bash_profile, first open the file:
sudo vim ~/.bash_profile
then add the following line: (remember to replace YOUR_ANDROID_SDK_PATH_HERE' with the android SDK file path (e.g. /Users/xxx/development/android-sdk-mac_x86))
export ANDROID_HOME=YOUR_ANDROID_SDK_PATH_HERE
2- Create a file called local.properties in the root dir of your Android project, and add the following line: (remember to replace YOUR_ANDROID_SDK_PATH_HERE' with the android SDK file path (e.g. /Users/xxx/development/android-sdk-mac_x86))
sdk.dir=YOUR_ANDROID_SDK_PATH_HERE
Upvotes: 3