-
-
Save shark0der/ca2fe61dc4e0f72b72f9 to your computer and use it in GitHub Desktop.
# install java | |
apt-get install -y software-properties-common | |
apt-add-repository -y ppa:webupd8team/java | |
apt-get update | |
apt-get install -y oracle-java8-installer | |
# download latest android sdk | |
# http://developer.android.com/sdk/index.html#Other | |
cd /opt | |
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz | |
tar -xvf android-sdk*-linux.tgz | |
cd android-sdk-linux/tools | |
./android update sdk --no-ui --filter platform,platform-tools | |
# set path | |
echo 'export PATH=$PATH:/opt/android-sdk-linux/platform-tools' >> /etc/profile.d/android.sh | |
echo 'export ANDROID_TOOLS=/opt/android-sdk-linux' >> /etc/profile.d/android.sh | |
source /etc/profile.d/android.sh | |
# add i386 support | |
dpkg --add-architecture i386 | |
apt-get update | |
apt-get install -y libc6:i386 libstdc++6:i386 zlib1g:i386 | |
# install sdks | |
cd /opt/android-sdk-linux/tools | |
./android list sdk --all | |
./android update -u -t 1,2,4,26,103 | |
# done! | |
adb connect <IP> |
instead of ./android update -u -t 1,2,4,26,103
should be ./android update --no-ui -t 1,2,4,26,103
I got
./android update -u -t 1,2,4,26,103
Error: Flag '-u' is not a valid global flag. Did you mean to specify it after the verb/object name?
and I have tried ./android update sdk -t 1,2,4,26,103
and I got following
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3550 or swt-pi-gtk in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.gtk.OS.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:403)
at com.android.sdkmanager.Main.doAction(Main.java:369)
at com.android.sdkmanager.Main.run(Main.java:151)
at com.android.sdkmanager.Main.main(Main.java:117)
Solved it using ./android update sdk --all
help please
./android update sdk --all
java.lang.NullPointerException
at java.io.File.(File.java:277)
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1616)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1577)
at com.android.sdklib.internal.avd.AvdManager.(AvdManager.java:350)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:373)
at com.android.sdklib.internal.repository.updater.UpdaterData.initSdk(UpdaterData.java:254)
at com.android.sdklib.internal.repository.updater.UpdaterData.(UpdaterData.java:122)
at com.android.sdkuilib.internal.repository.SwtUpdaterData.(SwtUpdaterData.java:61)
at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.(SdkUpdaterWindowImpl2.java:104)
at com.android.sdkuilib.repository.SdkUpdaterWindow.(SdkUpdaterWindow.java:88)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:407)
at com.android.sdkmanager.Main.doAction(Main.java:368)
at com.android.sdkmanager.Main.run(Main.java:150)
at com.android.sdkmanager.Main.main(Main.java:116)
Thanks a lot!
Tanks !
./android update sdk -u -t 1,2,4,26,103
SDK is missing, basically error is that its asking what to update.
sudo apt install libswt-gtk-3-java libswt-gtk-3-jni allowed me to run ./android with the GUI.
Update line 29 with:
./android update sdk -u -t 1,2,4,26,103
or all.
Thanks, with the sdk is ok, great tutorial.