-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-06-android-studio.sh
executable file
·57 lines (40 loc) · 1.44 KB
/
install-06-android-studio.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
. ~/.config/user-dirs.dirs
DOWNLOADS="$XDG_DOWNLOAD_DIR/downloads"
PLUGINS="$DOWNLOADS/android-studio-plugins"
mkdir -p $DOWNLOADS
mkdir -p $PLUGINS
mkdir -p ~/local
# http://developer.android.com/sdk/installing/studio.html
# http://www.cnx-software.com/2013/05/16/installing-android-studio-ide-in-ubuntu-hello-world-application/
(
cd $DOWNLOADS
[ -e android-studio-bundle-133.970939-linux.tgz ] || wget --timeout=30 --tries=0 http://dl.google.com/android/studio/install/0.4.2/android-studio-bundle-133.970939-linux.tgz
tar xzvf ./android-studio-bundle-133.970939-linux.tgz
mv ./android-studio-bundle-133.970939-linux/* ~/local/android-studio/
)
cat >>~/.profile <<EOF
export ANDROID_HOME="\$HOME/local/android-studio/sdk"
export PATH="\$ANDROID_HOME/tools:\$ANDROID_HOME/platform_tools:\$PATH"
EOF
source ~/.profile
echo "${ANDROID_HOME}"
echo "${PATH}"
which android-studio.sh
(
cd $DOWNLOADS
[ -e android-ndk-r9c-linux-x86_64.tar.bz2 ] || wget --timeout=30 --tries=0 http://dl.google.com/android/ndk/android-ndk-r9c-linux-x86_64.tar.bz2
tar xjvf ./android-ndk-r9c-linux-x86_64.tar.bz2
mv ./android-ndk-r9c-linux-x86_64/* ~/local/android-ndk-r9c/
)
cat >>~/.profile <<EOF
export ANDROID_NDK="\$HOME/local/android-ndk-r9c"
export NDK_BASE="\$ANDROID_NDK"
EOF
source ~/.profile
echo "${ANDROID_NDK}"
echo "${PATH}"
sudo apt-get install yasm
sudo apt-get install automake
sudo apt-get install libtool
sudo apt-get install android-tools-adb