{"id":781,"date":"2013-05-19T09:24:44","date_gmt":"2013-05-19T03:54:44","guid":{"rendered":"http:\/\/ramkulkarni.com\/blog\/?p=781"},"modified":"2013-05-19T09:24:44","modified_gmt":"2013-05-19T03:54:44","slug":"installing-and-configuring-android-sdk-without-ide","status":"publish","type":"post","link":"http:\/\/ramkulkarni.com\/blog\/installing-and-configuring-android-sdk-without-ide\/","title":{"rendered":"Installing and configuring Android SDK outside IDE"},"content":{"rendered":"<p>I have always configured and used Android SDK from Eclipse. In fact, ADT (Android\u00a0Development\u00a0Kit) bundle now comes with Eclipse IDE pre-configured for Android\u00a0development. \u00a0This makes using the SDK very easy. Options like configuring SDK manager and virtual device manager are\u00a0available\u00a0right from Eclipse menu.<\/p>\n<p>However, I had a requirement where I wanted to run only Android emulator and not IDE. The <a href=\"http:\/\/developer.android.com\/sdk\/index.html\" target=\"_blank\">Android SDK site<\/a>\u00a0has all the information to do this, but not in one easy to find place. So I thought I will write about it, for my own reference.<\/p>\n<p><!--more--><\/p>\n<h2>Downloading only SDK<\/h2>\n<p>First thing to do is to download only Android SDK. The <a href=\"http:\/\/developer.android.com\/sdk\/index.html\" target=\"_blank\">download page<\/a>\u00a0has the option for\u00a0downloading ADT bundle (with IDE)\u00a0prominently displayed. If you want to download only SDK, then click on &#8216;Use an Existing IDE&#8217; link, which will reveal the option to download only SDK tools.<\/p>\n<h2>Downloading Platform Tools and System Images<\/h2>\n<p>However, downloading SDK took is not enough to run the emulator. You now need to download platform tools. It is explained <a href=\"http:\/\/developer.android.com\/sdk\/installing\/adding-packages.html\" target=\"_blank\">here<\/a>. You first need to run the SDK manager. Go to &lt;sdk_folder&gt;\/tools folder. In Window, run &#8216;SDK Manager.exe&#8217;. In Mac, run the command &#8211; &#8216;.\/android sdk&#8217;.<br \/>\nThis opens up the SDK Manager. It shows tools and packages available for download and install. You will see that SDK Tools are already installed. Select platform tools and build tools options under Tools\u00a0category\u00a0 You also need to select and install at least one Android package, this is indicated by &#8216;Android &lt;version_number&gt;&#8217;.<\/p>\n<p><b id=\"docs-internal-guid-28e3787a-bac7-3bad-40ec-cc64d1bbb323\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/lh6.googleusercontent.com\/xaD_9r9pXJwrc4dCH8vDjUBufV2IC5LsBCwdaXA_9MRBCzXsI2o_nEp1bR0XAZyjLr16YXdQqderlUz-5zFLNhrCV2WIXWyJjFTh-MgoYaWpaA_N7swjyoQh\" width=\"700px;\" height=\"500px;\" \/><\/b><\/p>\n<p>Note that you must select SDK Platform and at least one System Image. Install the packages. This might take a long time if you had selected all the options.<\/p>\n<h2>Creating Virtual Device<\/h2>\n<p>From tools folder execute &#8216;android avd&#8217; command. This will open AVD Manager. Click on New button to create a virtual device. See <a href=\"http:\/\/developer.android.com\/tools\/devices\/managing-avds.html\" target=\"_blank\">Managing AVDs with AVD Manager<\/a>.<\/p>\n<h2>Starting Emulator<\/h2>\n<p>Once you create a virtual device in AVD Manager, you can select that device and click &#8216;Start&#8217; button to start the emulator using that virtual device.<\/p>\n<p>If you want to start the emulator outside AVD Manager, go to tools folder and run &#8217;emulator -avd &lt;avd_name&gt;&#8217; (replace &lt;avd_name&gt; with name of the virtual device you created) command. See <a href=\"http:\/\/developer.android.com\/tools\/devices\/emulator.html#starting\" target=\"_blank\">Starting and Stopping the Emulator<\/a>\u00a0.<\/p>\n<h2>Installing Application<\/h2>\n<p>Go to platform-tools folder and run the command &#8211; &#8216;adb install &lt;path_to_apk_file&#8217;. This will install the application in the emulator. See\u00a0<a href=\"http:\/\/developer.android.com\/tools\/devices\/emulator.html#apps\" target=\"_blank\">Installing Applications on the Emulator<\/a><\/p>\n<p>When installing the application if you get error &#8211; adb error : device not found. then try to stop adb and start again &#8211;<\/p>\n<p>To stop adb &gt; &#8216;adb kill-server&#8217;<br \/>\nTo start adb \u00a0&gt; &#8216;adb start-server&#8217;<\/p>\n<p>Then try to install the application again.<\/p>\n<p>-Ram Kulkarni<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have always configured and used Android SDK from Eclipse. In fact, ADT (Android\u00a0Development\u00a0Kit) bundle now comes with Eclipse IDE pre-configured for Android\u00a0development. \u00a0This makes using the SDK very easy. Options like configuring SDK manager and virtual device manager are\u00a0available\u00a0right from Eclipse menu. However, I had a requirement where I wanted to run only Android &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/ramkulkarni.com\/blog\/installing-and-configuring-android-sdk-without-ide\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing and configuring Android SDK outside IDE&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3,1],"tags":[2,69,70],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2g9O8-cB","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts\/781"}],"collection":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/comments?post=781"}],"version-history":[{"count":0,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts\/781\/revisions"}],"wp:attachment":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/media?parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/categories?post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/tags?post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}