Upgraded to Android Studio 0.2.0 and got the following error. The error got resolved after applying suggested solution but now the following error appeared.
In my case, in a cordova project, I had an old gradle version 1.4 and that was the problem. So try to remove gradle
sudo apt-get remove gradle
then, download new binary relase of gradle from here . I got v3.5.1. Finally, Create a directory for the Gradle installation.
sudo mkdir /opt/gradle
Extract the downloaded archive to the newly created directory.
sudo unzip -d /opt/gradle gradle-3.5.1-bin.zip
Configure the PATH environment variable so that the gradle executable can be directly executed anywhere on the system.
export PATH=$PATH:/opt/gradle/gradle-3.5.1/bin
You can run the following command to check if the Gradle install was successful.
gradle -v