I then followed the instruction, and in the ~/.bashrc file, I added the environment variable ANDROID_HOME
And then I sourced this file in the terminal:
source ~/.bashrc
When rebuilding the gradle model, the same problem persists!
To troubleshoot this, I then followed the instruction as shown in the first snapshot:
- Create a new file called local.properties in the root folder of the gradle project
Before adding local.properties After adding local.properties - Edit the newly created local.properties file, add the single line as following:
sdk.dir=/home/user/Android/adt/sdk
where “/home/user/Android/adt/sdk” is the path where installed the Android SDK.
- Rebuild the model, now it works!
This approach is also applicable to Mac OSX!
Happy coding!
Post a Comment