1page.title=Developer Workflow 2@jd:body 3 4<p>To develop apps for Android, you use a set of tools that are included in Android Studio. 5In addition to using the tools from Android Studio, 6you can also access most of the SDK tools from the command line. Developing with Android Studio is the 7preferred method because it can directly invoke the tools that you need while developing applications.</p> 8 9<p>However, you may choose to develop with another IDE or a simple text editor and invoke the 10tools on the command line or with scripts. This is a less streamlined way to develop because you 11will sometimes have to call command line tools manually, but you will have access to the same 12number of features that you would have in Android Studio.</p> 13 14<div class="figure" style="width:461px"> 15 <img src="{@docRoot}images/developing/developing_overview.png" 16 alt="Development process for Android applications" 17 height="738" /> 18 <p class="img-caption"> 19 <strong>Figure 1.</strong> The development process for Android applications. 20 </p> 21</div> 22 23<h2>App Workflow</h2> 24 25<p>The basic steps for developing applications (with or without Android Studio) are shown in 26figure 1. The development steps encompass four development phases, which include:</p> 27 28<ul> 29 <li><strong>Environment Setup</strong> 30 <p>During this phase you install and set up your development environment. You also create 31 Android Virtual Devices (AVDs) and connect hardware devices on which you can install your 32 applications.</p> 33 <p>See <a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a> 34 and <a href="{@docRoot}tools/device.html">Using Hardware Devices</a> for more 35 information. 36 </li> 37 <li><strong>Project Setup and Development</strong> 38 <p>During this phase you set up and develop your Android Studio project and application modules, 39 which contain all of the source code and resource files for your application. For more 40 information, see 41 <a href="{@docRoot}tools/projects/index.html">Create an Android project</a>.</p> 42 </li> 43 <li><strong>Building, Debugging and Testing</strong> 44 <p>During this phase you build your project into a debuggable <code>.apk</code> package(s) 45 that you can install and run on the emulator or an Android-powered device. Android Studio uses 46 a build system based on <a href="http://www.gradle.org/" target="_android">Gradle</a> 47 that provides flexibility, customized build variants, dependency resolution, and much more. 48 If you're using another IDE, you can build your project using Gradle and install it on a device 49 using <a href="{@docRoot}tools/help/adb.html">adb</a>. For more information, see 50 <a href="{@docRoot}tools/building/index.html">Build and run your application</a>.</p> 51 <p>Next, with Android Studio you debug your application using the 52 <a href="{@docRoot}tools/help/monitor.html">Android Device Monitor</a> and device log messages 53 (<a href="{@docRoot}tools/help/logcat.html">logcat</a>) along with the IntelliJ IDEA intelligent 54 coding features. You can also use a JDWP-compliant debugger along with the debugging and logging 55 tools that are provided with the Android SDK. For more information see 56 <a href="{@docRoot}tools/debugging/index.html">Debug your application with the SDK debugging and logging tools</a>.</p> 57 <p>Last, you test your application using various Android SDK testing tools. For more 58 information, see <a href="{@docRoot}tools/testing/index.html">Test your application 59 with the Testing and Instrumentation framework</a>.</p> 60 </li> 61 <li><strong>Publishing</strong> 62 <p>During this phase you configure and build your application for release and distribute your 63 application to users. For more information, see 64 <a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing 65 Overview</a>.</p> 66 </li> 67</ul> 68 69 70 71<h2 id="EssentialTools">Essential command line tools</h2> 72 73 <p>When developing in IDEs or editors other than Android Studio, be familiar with 74 all of the tools below, because you will have to run them from the command line or script.</p> 75 76 <dl> 77 <dt><a href="{@docRoot}tools/help/android.html">android</a></dt> 78 79 <dd>Create and update Android projects and create, move, and delete AVDs.</dd> 80 81 <dt><a href="{@docRoot}tools/help/emulator.html">Android Emulator</a></dt> 82 83 <dd>Run your Android applications on an emulated Android platform.</dd> 84 85 <dt><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a></dt> 86 87 <dd>Interface with your emulator or connected device (install apps, shell the device, issue 88 commands, etc.).</dd> 89 </dl> 90 91 <p>In addition to the above tools that are included with the SDK, you need the following open 92 source and third-party tools:</p> 93 94 <dl> 95 <dt><a href="http://www.gradle.org/">Gradle</a> </dt> 96 97 <dd>To compile and build your Android project into an installable .apk file(s).</dd> 98 99 <dt>Keytool</dt> 100 101 <dd>To generate a keystore and private key, used to sign your .apk file. Keytool is part of the 102 JDK.</dd> 103 104 <dt>Jarsigner (or similar signing tool)</dt> 105 106 <dd>To sign your .apk file with a private key generated by Keytool. Jarsigner is part of the 107 JDK.</dd> 108 </dl> 109 110 <p>If you are using Android Studio, tools such as <code>adb</code> and <code>android</code> 111 are automatically called by Android Studio so you don't have to manually invoke these tools. 112 You need to be familiar with <code>adb</code>, however, because certain functions are not 113 accessible from Android Studio, such as the <code>adb</code> shell commands. You might also 114 need to call Keytool and Jarsigner to sign your applications, but you can set up Android Studio 115 to do this automatically as well.</p> 116 117<p>For more information on the tools provided with the Android SDK, see the 118 <a href="{@docRoot}tools/help/index.html">Tools</a> section of the documentation.</p> 119 120 121 122