summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/developing/index.jd
blob: 722c75a16e4362c53acc7454534695483c0a6810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
page.title=Introduction
@jd:body

<p>Developing applications for Android devices is facilitated by a group of tools that are
  provided with the SDK. You can access these tools through an Eclipse plugin called ADT (Android
  Development Tools) or from the command line. Developing with Eclipse is the preferred method because
  it can directly invoke the tools that you need while developing applications.</p>

  <p>However, you may choose to develop with another IDE or a simple text editor and invoke the
  tools on the command line or with scripts. This is a less streamlined way to develop because you
  will sometimes have to call command line tools manually, but you will have access to the same
  number of features that you would have in Eclipse.</p>

  <p class="note"><strong>Note:</strong> Before you begin developing Android applications, make
    sure you have gone through all of the steps outlined in <a
href="{@docRoot}sdk/installing.html">Installing the SDK</a>.</p>

  <p>The basic steps for developing applications with or without Eclipse are the same:</p>

  <ol>

    <li>Set up Android Virtual Devices or hardware devices.

      <p>You need to create Android Virtual Devices (AVD) or connect hardware devices on which
      you will install your applications.</p>

      <p>See <a href="{@docRoot}guide/developing/devices/index.html">Managing Virtual Devices</a>
      and <a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> for more
information.
    </li>

    <li>
      <a href="{@docRoot}guide/developing/projects/index.html">Create an Android project</a>.

      <p>An Android project contains all source code and resource files for your application. It is
      built into an <code>.apk</code> package that you can install on Android devices.</p>
    </li>

    <li>
      <a href="{@docRoot}guide/developing/building/index.html">Build and run your
      application</a>.

      <p>If you are using Eclipse, builds are generated each time you save changes and you can install
      your application on a device by clicking <strong>Run</strong>. If you're using another IDE, you can build your
      project using Ant and install it on a device using <code>adb</code>.</p>
    </li>

    <li>
      <a href="{@docRoot}guide/developing/debugging/index.html">Debug your application with the
      SDK debugging and logging tools</a>.

      <p>Debugging your application involves using a JDWP-compliant debugger along with the
      debugging and logging tools that are provided with the Android SDK. Eclipse already
      comes packaged with a compatible debugger.</p>
    </li>

    <li>
      <a href="{@docRoot}guide/developing/testing/index.html">Test your application with the
      Testing and Instrumentation framework</a>.

      <p>The Android SDK provides a testing and instrumnetation framework to help you set up and
      run tests within an emulator or device.</p>
    </li>
  </ol>
 
<h2 id="EssentialTools">Essential command line tools</h2>

  <p>When developing in IDEs or editors other than Eclipse, be familiar with
  all of the tools below, because you will have to run them from the command line.</p>

  <dl>
    <dt><a href="{@docRoot}guide/developing/tools/android.html">android</a></dt>

    <dd>Create and update Android projects and create, move, and delete AVDs.</dd>

    <dt><a href="{@docRoot}guide/developing/devices/emulator.html">Android Emulator</a></dt>

    <dd>Run your Android applications on an emulated Android platform.</dd>

    <dt><a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a></dt>

    <dd>Interface with your emulator or connected device (install apps, shell the device, issue
    commands, etc.).</dd>
  </dl>

  <p>In addition to the above tools that are included with the SDK, you need the following open
  source and third-party tools:</p>

  <dl>
    <dt>Ant</dt>

    <dd>To compile and build your Android project into an installable .apk file.</dd>

    <dt>Keytool</dt>

    <dd>To generate a keystore and private key, used to sign your .apk file. Keytool is part of the
    JDK.</dd>

    <dt>Jarsigner (or similar signing tool)</dt>

    <dd>To sign your .apk file with a private key generated by Keytool. Jarsigner is part of the
    JDK.</dd>
  </dl>
  
  <p>If you are using Eclipse and ADT, tools such as <code>adb</code> and <code>android</code>
  are automatically called by Eclipse and ADT so you don't have to manually invoke these tools.
  You need to be familiar with <code>adb</code>, however, because certain functions are not
accessible from
  Eclipse, such as the <code>adb</code> shell commands. You might also need to call Keytool and
Jarsigner to
  sign your applications, but you can set up Eclipse to do this automatically as well.</p>
  
<p>For more information on the tools provided with the Android SDK, see the
  <a href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the documentation.</p>
  
<h2 id="ThirdParty">Other Third-Party Development Tools</h2>
<p>
	The tools described in this section are not developed by the Android SDK team. The Android Dev Guide
	    does not provide documentation for these tools. Please refer to the linked documents in each
	    section for documentation.
</p>  
<h3 id="IntelliJ">Developing in IntelliJ IDEA</h3>
<div style="float: right">
<img alt="The IntelliJ graphical user interface" height="500px" src="{@docRoot}images/developing/intellijidea_android_ide.png"/>
</div>
<p>
	IntelliJ IDEA is a powerful Java IDE from JetBrains that provides
	full-cycle Android development support in both the free Community
	Edition and the Ultimate edition.
</p>
<p>
	The IDE ensures compatibility with the latest Android SDK and offers a
	smart code editor with completion, quick navigation between code and
	resources, a graphical debugger, unit testing support using Android
	Testing Framework, and the ability to run applications in either the
	emulator or a USB-connected device.
</p>
<p>
	<strong>Links:</strong>
</p>
<ul>
	<li>
    	<a href="http://www.jetbrains.com/idea">IntelliJ IDEA official website</a>
</li>
	<li>
    	<a href="http://www.jetbrains.com/idea/features/google_android.html">Android support in IntelliJ IDEA</a>
</li>
	<li>
    	<a href="http://wiki.jetbrains.net/intellij/Android">IntelliJ IDEA Android Tutorials</a>
	</li>
</ul>