在Debian 8纯命令行安装android开发环境方法


/*****************************
* Author : Samson
* Date : 09/07/2015
* Test platform:
* gcc 4.8.4
* GNU bash, 4.3.30
* Debian GNU/Linux 8
* ***************************/

Install JDK8

su -
echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee /etc/apt/sources.list.d/webupd8team-java.list
echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886
apt-get update
apt-get install -y oracle-java8-installer
exit

How to accept the Oracle JDK8 license automatically:

echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

How to set the Java environment variables:

sudo apt-get install oracle-java8-set-default

REF:
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

Install android sdk and ndk

sudo dpkg –add-architecture i386
sudo apt-get update
sudo apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
sudo dpkg –remove-architecture i386

cd ~
wget http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz
tar zxvf android-sdk_r24.3.4-linux.tgz

ANDROID_HOME= HOME/androidsdklinuxechoexportPATH= PATH: ANDROIDHOME/tools: ANDROID_HOME/platform-tools”” >> /etc/profile
echo “export ANDROID_HOME” >> /etc/profile

source /etc/profile

cd ~
wget http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin
chmod a+x ./android-ndk-r10e-linux-x86_64.bin
./android-ndk-r10e-linux-x86_64.bin

echo “export ANDROID_NDK_HOME=$HOME/android-ndk-r10e” >> /etc/profile

Install sbt

cd ~
apt-get install -y apt-transport-https
echo “deb https://dl.bintray.com/sbt/debian /” | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 642AC823
sudo apt-get update
sudo apt-get install -y sbt

REF:
http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html

智能推荐

注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告