Open Terminal. Type javac -version and check your current JDK version. If you seem to have javac 1.7.* JDK version, you can skip this section.
- Open
Termianl. - Type
sudo apt-get install openjdk-7-jdk.
Download the standalone SDK tools from official website.
Tip: I renamed my SDK tools directory to "sdk" and put it in to
~/dev/android/.
- Open
Terminal. - Navigate to
.../sdk-directory/tools/. - Run
./android sdk. - Add necessary SDK packages.
Open ~/.profile or ~/.bashrc in your text editor and add following lines.
export ANDROID_HOME=~/location/to/your/android/sdk
export PATH=$PATH:$ANDROID_HOME/tools/
export PATH=$PATH:$ANDROID_HOME/platform-tools/
This will create the project with gradle.
android create project -p /location/to/MyProject -a MainActivity -k com.domain.myproject -t <target-id> -g -v 0.12.+
<target-id>: Type android list targets in Terminal to get all available sdks.
./gradlew build
./gradlew installDebug
Still having issues?
Open build.gradle and see if your gradle version (type ./gradlew --version in Terminal) is compatible with com.android.tools.build:gradle version. Read more
Or drop me a message @ [email protected]
Hi
How to manually configure Gradle to build an existing android project that is created without "android create project"?
thanks