{"id":5,"date":"2011-05-30T21:36:16","date_gmt":"2011-05-30T21:36:16","guid":{"rendered":"http:\/\/choudhury.com\/blog\/?p=5"},"modified":"2012-04-03T23:42:11","modified_gmt":"2012-04-03T23:42:11","slug":"installing-android-part-1","status":"publish","type":"post","link":"https:\/\/choudhury.com\/blog\/2011\/05\/30\/installing-android-part-1\/","title":{"rendered":"Android Development Part 1"},"content":{"rendered":"<p>There a couple of android tutorials floating around using eclipse and or ant but I my preferred tools are Intellij and Maven. This how I got started on my android development..<\/p>\n<p>Download the <a title=\"JDK\" href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\">JDK<\/a> and run the setup.<\/p>\n<p>Download the <a title=\"Android SDK\" href=\"http:\/\/developer.android.com\/sdk\/index.html\">Android SDK<\/a> and install\/unzip to a desired location.<\/p>\n<p>Download <a title=\"Intellij\" href=\"http:\/\/www.jetbrains.com\/idea\/\">IntelliJ<\/a> version 10.5 and run the setup.<\/p>\n<p>Download <a href=\"http:\/\/maven.apache.org\/\">Maven<\/a> zip File and unzip to a desired location.<\/p>\n<p>Setup some environment variables on your machine.<\/p>\n<p>Set JAVA_HOME environment variable to where the JDK is installed.<\/p>\n<p>Set ANDROID_HOME environment variable to where you&#8217;ve installed android<\/p>\n<p>Set MAVEN_HOME environment variable to where maven is located.<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/environment_variables.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7\" title=\"Environment Variable\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/environment_variables.png\" alt=\"\" width=\"358\" height=\"145\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/environment_variables.png 358w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/environment_variables-300x121.png 300w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/a><\/p>\n<p>Update your existing PATH variable to include the following (%JAVA_HOME%\\bin , %ANDROID_HOME% , %MAVEN_HOME%\\bin\u00a0 &#8211; <strong>NOTE<\/strong>: No bin directory for ANDROID_HOME )<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/path_variable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6\" title=\"Update your PATH variable\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/path_variable.png\" alt=\"\" width=\"357\" height=\"153\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/path_variable.png 357w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/path_variable-300x128.png 300w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/a><\/p>\n<p>Launch a CMD prompt and type <strong>android <\/strong>to check that it launches correctly (if not, double-check you&#8217;ve correctly setup ANDROID_HOME and updated your PATH variable correctly)<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_commandline.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8\" title=\"android_commandline\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_commandline.png\" alt=\"\" width=\"565\" height=\"251\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_commandline.png 565w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_commandline-300x133.png 300w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>If all goes well, you should see the android avd and sdk manager being launched.<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_sdk_avd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9\" title=\"android_sdk_avd\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_sdk_avd.png\" alt=\"\" width=\"745\" height=\"433\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_sdk_avd.png 745w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/android_sdk_avd-300x174.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><\/p>\n<p>This tool is used to download the Android SDK platform for different versions and also to create virtual android devices with different capabilities, it allows you to test\/deploy your code to the various virtual devices with different capabilities and get an idea how it will run.<\/p>\n<p>Click on &#8220;Available Packages&#8221; on the left and then expand the &#8220;Android Repository&#8221; on the right and tick the SDK platforms you are interested in installing,\u00a0 its also good idea to install a sample package aswell &#8211; this contains sample code to help you learn how to use the different Android API (the sample code folder will be located under\u00a0 %ANDROID_HOME%\/samples).<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/available_android_sdk_avd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18\" title=\"available_android_sdk_avd\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/available_android_sdk_avd.png\" alt=\"\" width=\"758\" height=\"488\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/available_android_sdk_avd.png 758w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/available_android_sdk_avd-300x193.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><\/p>\n<p>After you&#8217;ve installed the packages, you&#8217;ll want to create the virtual android device which is done by clicking on &#8220;Virtual Devices&#8221; on the left hand side and then click &#8220;New..&#8221; button.<\/p>\n<p>Enter the name for your virtual device and from the Target select the API version (the target drop-down is populated by the SDK you&#8217;ve chosen to install in the previous step).<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/first_avd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12\" title=\"first_avd\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/first_avd.png\" alt=\"\" width=\"410\" height=\"618\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/first_avd.png 410w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/first_avd-199x300.png 199w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/a><\/p>\n<p>Well done! You now have the Android SDK installed and you&#8217;ve created a virtual device to test your code against.<\/p>\n<p><a href=\"blog\/?p=114\"><strong>In part 2 we have and example maven build for the hello world app.<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There a couple of android tutorials floating around using eclipse and or ant but I my preferred tools are Intellij and Maven. This how I got started on my android development.. Download the JDK and run the setup. Download the Android SDK and install\/unzip to a desired location. Download IntelliJ version 10.5 and run the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/choudhury.com\/blog\/2011\/05\/30\/installing-android-part-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Android Development Part 1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-android"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":15,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}