Skip to content

Commit 68b0dd5

Browse files
committed
feat: android sdk
1 parent f652c6a commit 68b0dd5

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "android-sdk",
3+
"id": "android-sdk",
4+
"version": "1.0.0",
5+
"description": "Setup android sdk in your development container",
6+
"documentationURL": "https://github.com/pnstack/codespace",
7+
"licenseURL": "https://github.com/pnstack/codespace/blob/main/LICENSE",
8+
"options": {}
9+
}

src/android-sdk/install.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
wget https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
2+
unzip commandlinetools-linux-9123335_latest.zip
3+
mv cmdline-tools latest
4+
mkdir $HOME/.android
5+
mkdir $HOME/.android/cmdline-tools
6+
mv latest $HOME/.android/cmdline-tools
7+
# Export the Android SDK path
8+
rm -f ./commandlinetools-linux-9123335_latest.zip
9+
10+
echo 'export ANDROID_HOME=$HOME/.android' >> ~/.bashrc
11+
echo 'export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin' >> ~/.bashrc
12+
echo 'export PATH=$PATH:$ANDROID_HOME/platform-tools' >> ~/.bashrc
13+
echo 'export PATH=$PATH:$ANDROID_HOME/tools' >> ~/.bashrc
14+
echo 'export PATH=$PATH:$ANDROID_HOME/tools/bin' >> ~/.bashrc
15+
echo 'export PATH=$PATH:$ANDROID_HOME/emulator' >> ~/.bashrc
16+
17+
source ~/.bashrc
18+
19+
yes | sdkmanager "platform-tools" "platforms;android-33"
20+
yes | sdkmanager "build-tools;33.0.0"
21+
yes | sdkmanager "extras;android;m2repository"
22+
yes | sdkmanager --install "ndk;23.1.7779620"

0 commit comments

Comments
 (0)