-
Notifications
You must be signed in to change notification settings - Fork 0
/
android-sdk-install.html
3 lines (3 loc) · 2.96 KB
/
android-sdk-install.html
1
2
3
<!doctype html><meta charset=utf-8><title>make</title><meta content="Thomas Duboucher" name=author><meta content="Thomas Duboucher, Serianox,blog" name=keywords><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name=viewport><link href=style.css rel=stylesheet><h1 id=android-headless-sdk-installation>Android <em>headless</em> SDK installation</h1><p>I wanted to install <em>Android SDK</em> without installing this ugly IDE. The main goal was to rebuild existing projects, so I didn’t need something as heavy. The main difficulty came when I downloaded the actual sdk, and receive the following message from Google.<blockquote><p>Because you’ve downloaded the command line tools (not Android Studio), there are no install instructions.</blockquote><p>First things first. The SDK can be easily found on the download page of the Android developer website. Hidden at the end of the page in a section named <em><a href=https://developer.android.com/studio/index.html#command-tools>Get just the command line tools</a></em>.<p>We download a <code>.zip</code> file, because it’s to complicated to provide a tarball, and unzip it somewhere, preferably <code>~/.android</code>.<p>Then we update your <code>~/.profile</code>, or wherever we put your env to include the following lines <em>mutatis mutandis</em> and reload our session.<div class=sourceCode id=cb1><pre class="sourceCode bash"><code class="sourceCode bash"><a class=sourceLine id=cb1-1 title=1><span class=bu>export</span> <span class=va>ANDROID_HOME=</span><span class=st>"</span><span class=va>$HOME</span><span class=st>/.android"</span></a>
<a class=sourceLine id=cb1-2 title=2><span class=bu>export</span> <span class=va>PATH=</span><span class=st>"</span><span class=va>$ANDROID_HOME</span><span class=st>/tools:</span><span class=va>$ANDROID_HOME</span><span class=st>/tools/bin:</span><span class=va>$ANDROID_HOME</span><span class=st>/platform-tools:</span><span class=va>$PATH</span><span class=st>"</span></a></code></pre></div><p>Once we’re here, the installation is straightforward once we now which command to run.<div class=sourceCode id=cb2><pre class="sourceCode bash"><code class="sourceCode bash"><a class=sourceLine id=cb2-1 title=1><span class=ex>android</span> update sdk</a></code></pre></div><p>Then we must install some build tools.<div class=sourceCode id=cb3><pre class="sourceCode bash"><code class="sourceCode bash"><a class=sourceLine id=cb3-1 title=1><span class=ex>sdkmanager</span> <span class=st>"platforms;android-23"</span></a>
<a class=sourceLine id=cb3-2 title=2><span class=ex>sdkmanager</span> <span class=st>"build-tools;23.0.1"</span></a></code></pre></div><p>And also we must not forget to install all those <code>compat</code> libraries.<div class=sourceCode id=cb4><pre class="sourceCode bash"><code class="sourceCode bash"><a class=sourceLine id=cb4-1 title=1><span class=ex>sdkmanager</span> <span class=st>"extras;android;m2repository"</span></a></code></pre></div><p>And <em>voilà</em>!