First off, if this belongs on Ask Ubuntu, my apologies...I\'m not really sure what forum this falls under.
I\'m attempting to fork and build an Android project from
I have solved it by overriding GRADLE_USER_HOME enviromental variable.
GRADLE_USER_HOME
In ~/.bashrc file, add the next line:
export GRADLE_USER_HOME=/home/www-data/.gradle
Where www-data is the username.
www-data
And restart your session or execute source ~/.bashrc to apply changes.
source ~/.bashrc