Forked from lirantal/Ionic 2 - Android setup for Ubuntu 16.04
Last active
February 5, 2017 00:03
-
-
Save masterkawaster/4e182c6af264780a3096edea3d9835ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Android SDK setup | |
## Install Java | |
```bash | |
sudo apt-get update | |
sudo dpkg --add-architecture i386 | |
sudo apt-get install libbz2-1.0:i386 | |
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 | |
sudo apt-get install openjdk-8-jdk openjdk-8-jre | |
``` | |
Add JAVA_HOME to path via ~/.bashrc | |
```bash | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
``` | |
## Option1: Install Android Studio | |
Download ZIP archive for Linux from: https://developer.android.com/studio/install.html | |
1. move the .zip to /opt | |
2. extract it to ~/Android/Sdk | |
3. chown the folder to your name | |
4. chmod 777 studio.sh and run it for the installer | |
Now the android sdk is installed to ~/Android/Sdk | |
It's preferred to add ~/Android/Sdk folders to your path: | |
Run `android`, install the images (atom, etc) and then navigate to Tools -> Manage AVDs and create a new image | |
Make sure to install the android-23 version and confirm it exists in ~/Android/Sdk/platforms/ | |
```bash | |
export PATH=${PATH}:~/Android/Sdk/tools | |
export PATH=${PATH}:~/Android/Sdk/platform-tools | |
``` | |
##Option2: You can install sdk separatelly: | |
1. https://developer.android.com/studio/index.html | |
2. download for linux and unzip in ~/Android/Sdk | |
3. navigate to tools/ | |
4. run '''sudo ./android''' | |
5. select most of the stuff and install it | |
Now the android sdk is installed to ~/Android/Sdk | |
It's preferred to add ~/Android/Sdk folders to your path: | |
```bash | |
export PATH=${PATH}:~/Android/Sdk/tools | |
export PATH=${PATH}:~/Android/Sdk/platform-tools | |
``` | |
# Ionic setup | |
## Pre-requisties | |
* Node.js v6 | |
* npm v3 | |
# Install latest cordova and ionic from npm | |
```bash | |
npm install -g cordova ionic | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment