{"id":28,"date":"2015-02-28T05:38:46","date_gmt":"2015-02-28T05:38:46","guid":{"rendered":"http:\/\/niveditaupadhyay.com\/?p=28"},"modified":"2018-03-01T07:20:31","modified_gmt":"2018-03-01T07:20:31","slug":"setting-up-an-ubuntu-machine-for-android-development","status":"publish","type":"post","link":"http:\/\/niveditaupadhyay.com\/?p=28","title":{"rendered":"Setting up an Ubuntu machine for Android Development"},"content":{"rendered":"<div>A little while ago I had to setup an Ubuntu machine for Android development. I thought it will be useful for anyone who is trying to do the same.<\/div>\n<div><\/div>\n<div>Here are the steps that I followed:<\/div>\n<div><\/div>\n<div><\/div>\n<div><strong>Installing Ubuntu<\/strong><\/div>\n<ul>\n<li>Ubuntu Download link<br \/>\n<a href=\"http:\/\/www.ubuntu.com\/download\/desktop\">http:\/\/www.ubuntu.com\/download\/desktop<\/a> (top link)<\/li>\n<li>Run the iso file from Windows and let it finish the installation.<\/li>\n<li>After installation is finished reboot the machine and you should get the option to boot either Windows or Ubuntu.<\/li>\n<\/ul>\n<div><strong>Installing JDK\/JRE<\/strong><\/div>\n<ul>\n<li>For the default jdk (currently openjdk-6):<br \/>\n\u201csudo apt-get install default-jdk\u201d<\/li>\n<li>If you want openjdk-7:<br \/>\n\u201csudo apt-get install openjdk-7-jdk\u201d<br \/>\n(these commands should install all dependencies automatically)<\/li>\n<li>If you want the Oracle jdk, follow instructions here:<br \/>\n<a href=\"http:\/\/www.webupd8.org\/2012\/01\/install-oracle-java-jdk-7-in-ubuntu-via.html\">http:\/\/www.webupd8.org\/2012\/01\/install-oracle-java-jdk-7-in-ubuntu-via.html<\/a><\/li>\n<\/ul>\n<div><strong>Installing Android SDK<\/strong><\/div>\n<ul>\n<li>Android SDK download link<br \/>\n<a href=\"http:\/\/developer.android.com\/sdk\/index.html\">http:\/\/developer.android.com\/sdk\/index.html<\/a><\/li>\n<li>Launch the eclipse from the eclipse directory inside the adt-bundle directory.<\/li>\n<li>Go to Window &gt; Android SDK Manager. It will launch the Android SDK Manager window. Install all the required tools and API packages.<\/li>\n<li>In eclipse I ran into an error that it cannot find adb. I found this useful link<br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/13571145\/android-adb-not-found\">http:\/\/stackoverflow.com\/questions\/13571145\/android-adb-not-found<\/a><br \/>\nthat suggests use command \u201capt-get install ia32-libs\u201d to install IA32 library and that should fix the issue.<\/li>\n<\/ul>\n<div><strong>Importing SSH keys<\/strong><\/p>\n<div>\n<ul>\n<li>Generate a pair of keys by following command<br \/>\n\u201cssh-keygen -t rsa -b 4096\u201d<\/li>\n<li>In my case keys were generated under Home directory and I used following commands to move them to the location where git looks for it by default<br \/>\n\u201cmv your_public_key.pub $HOME\/.ssh\/id_rsa.pub\u201d<br \/>\n\u201cmv your_private_key $HOME\/.ssh\/id_rsa\u201d<\/li>\n<li>Add the SSH key to github. Go to following link<br \/>\n<a href=\"https:\/\/github.com\/settings\/ssh\">https:\/\/github.com\/settings\/ssh<\/a><br \/>\nClick Add SSH Key then give it a name and paste the content from your public key(.pub) in the box and hit Add button at the bottom.<\/li>\n<\/ul>\n<div>You should now be able to clone, pull and push from\/to github.<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A little while ago I had to setup an Ubuntu machine for Android development. I thought it will be useful for anyone who is trying to do the same. Here are the steps that I followed: Installing Ubuntu Ubuntu Download link http:\/\/www.ubuntu.com\/download\/desktop (top link) Run the iso file from Windows and let it finish the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-android"],"_links":{"self":[{"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28"}],"version-history":[{"count":14,"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":63,"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions\/63"}],"wp:attachment":[{"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/niveditaupadhyay.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}