Merge "Doc change: Add notes for SDK Tools r7 and ADT 0.9.8." into froyo
This commit is contained in:
committed by
Android (Google) Code Review
commit
3eb07ea483
@@ -438,10 +438,10 @@ framework_docs_SDK_CURRENT_DIR:=$(framework_docs_SDK_VERSION)_r$(framework_docs_
|
||||
framework_docs_SDK_PREVIEW:=0
|
||||
|
||||
## Latest ADT version identifiers, for reference from published docs
|
||||
framework_docs_ADT_VERSION:=0.9.7
|
||||
framework_docs_ADT_DOWNLOAD:=ADT-0.9.7.zip
|
||||
framework_docs_ADT_BYTES:=8033750
|
||||
framework_docs_ADT_CHECKSUM:=de2431c8d4786d127ae5bfc95b4605df
|
||||
framework_docs_ADT_VERSION:=0.9.8
|
||||
framework_docs_ADT_DOWNLOAD:=ADT-0.9.8.zip
|
||||
framework_docs_ADT_BYTES:=8703591
|
||||
framework_docs_ADT_CHECKSUM:=22070f8e52924605a3b3abf87c1ba39f
|
||||
|
||||
framework_docs_LOCAL_DROIDDOC_OPTIONS += \
|
||||
-hdf sdk.version $(framework_docs_SDK_VERSION) \
|
||||
|
||||
@@ -21,6 +21,7 @@ page.title=Developing In Eclipse, with ADT
|
||||
<li><a href="#librarySetup">Setting up a library project</a></li>
|
||||
<li><a href="#libraryReference">Referencing a library project</a></li>
|
||||
<li><a href="#considerations">Development considerations</a></li>
|
||||
<li><a href="#libraryMigrating">Migrating library projects to ADT 0.9.8</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#Tips">Eclipse Tips</a></li>
|
||||
@@ -644,10 +645,6 @@ across all projects). </p>
|
||||
is because the library project is compiled by the main project to use the
|
||||
correct resource IDs.</p>
|
||||
|
||||
<p><strong>One library project cannot reference another</strong></p>
|
||||
|
||||
<p>A library cannot depend on another library.</p>
|
||||
|
||||
<p><strong>A library project can include a JAR library</strong></p>
|
||||
|
||||
<p>You can develop a library project that itself includes a JAR library, however
|
||||
@@ -664,13 +661,6 @@ application must declare the external library their manifest files, in a <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code><uses-library></code></a>
|
||||
element. </p>
|
||||
|
||||
<p><strong>Library project can not include AIDL files</strong></p>
|
||||
|
||||
<p>The tools do not support the use of <a
|
||||
href="{@docRoot}guide/developing/tools/aidl.html">AIDL</a> files in a library project.
|
||||
Any AIDL files used by an application must be stored in the application project
|
||||
itself.</p>
|
||||
|
||||
<p><strong>Library project can not include raw assets</strong></p>
|
||||
|
||||
<p>The tools do not support the use of raw asset files in a library project.
|
||||
@@ -730,8 +720,76 @@ project can reference the library project by a relative link. You can place the
|
||||
library project What is important is that the main project can reference the
|
||||
library project through a relative link.</p>
|
||||
|
||||
<h3 id="libraryMigrating">Migrating library projects to ADT 0.9.8</h3>
|
||||
|
||||
<h2 id="Tips">Eclipse Tips </h2>
|
||||
<p>This section provides information about how to migrate a library project
|
||||
created with ADT 0.9.7 to ADT 0.9.8 (or higher). The migration is needed only if
|
||||
you are developing in Eclipse with ADT and assumes that you have also upgraded
|
||||
to SDK Tools r7 (or higher). </p>
|
||||
|
||||
<p>The way that ADT handles library projects has changed between
|
||||
ADT 0.9.7 and ADT 0.9.8. Specifically, in ADT 0.9.7, the <code>src/</code>
|
||||
source folder of the library was linked into the dependent application project
|
||||
as a folder that had the same name as the library project. This worked because
|
||||
of two restrictions on the library projects:</p>
|
||||
|
||||
<ul>
|
||||
<li>The library was only able to contain a single source folder (excluding the
|
||||
special <code>gen/</code> source folder), and</li>
|
||||
<li>The source folder was required to have the name <code>src/</code> and be
|
||||
stored at the root of the project.</li>
|
||||
</ul>
|
||||
|
||||
<p>In ADT 0.9.8, both of those restrictions were removed. A library project can
|
||||
have as many source folders as needed and each can have any name. Additionally,
|
||||
a library project can store source folders in any location of the project. For
|
||||
example, you could store sources in a <code>src/java/</code> directory. In order
|
||||
to support this, the name of the linked source folders in the main project are
|
||||
now called <<em>library-name</em>>_<<em>folder-name</em>> For
|
||||
example: <code>MyLibrary_src/</code> or <code>MyLibrary_src_java/</code>.</p>
|
||||
|
||||
<p>Additionally, the linking process now flags those folders in order for ADT to
|
||||
recognize that it created them. This will allow ADT to automatically migrate the
|
||||
project to new versions of ADT, should they contain changes to the handling of
|
||||
library projects. ADT 0.9.7 did not flag the linked source folders, so ADT 0.9.8
|
||||
cannot be sure whether the old linked folders can be removed safely. After
|
||||
upgrading ADT to 0.9.8, you will need to remove the old linked folders manually
|
||||
in a simple two-step process, as described below.</p>
|
||||
|
||||
<p>Before you begin, make sure to create a backup copy of your application or
|
||||
save the latest version to your code version control system. This ensures that
|
||||
you will be able to easily revert the migration changes in case there is a
|
||||
problem in your environment.</p>
|
||||
|
||||
<p>When you first upgrade to ADT 0.9.8, your main project will look as shown
|
||||
below, with two linked folders (in this example, <code>MyLibrary</code> and
|
||||
<code>MyLibrary_src</code> — both of which link to
|
||||
<code>MyLibrary/src</code>. Eclipse shows an error on one of them because they
|
||||
are duplicate links to a single class.</p>
|
||||
|
||||
<img src="{@docRoot}images/developing/lib-migration-0.png" alt="">
|
||||
|
||||
<p>To fix the error, remove the linked folder that <em>does not</em> contain the
|
||||
<code>_src</code> suffix. </p>
|
||||
|
||||
<ol>
|
||||
<li>Right click the folder that you want to remove (in this case, the
|
||||
<code>MyLibrary</code> folder) and choose <strong>Build Path</strong> >
|
||||
<strong>Remove from Build Path</strong>, as shown below.</li>
|
||||
|
||||
<img src="{@docRoot}images/developing/lib-migration-1.png" style="height:600px"
|
||||
alt="">
|
||||
|
||||
<li>Next, When asked about unlinking the folder from the project, select
|
||||
<strong>Yes</strong>, as shown below.</li>
|
||||
|
||||
<img src="{@docRoot}images/developing/lib-migration-2.png" alt="">
|
||||
</ol>
|
||||
|
||||
<p>This should resolve the error and migrate your library project to the new
|
||||
ADT environment. </p>
|
||||
|
||||
<h2 id="Tips">Eclipse Tips</h2>
|
||||
|
||||
<h3 id="arbitraryexpressions">Executing arbitrary Java expressions in Eclipse</h3>
|
||||
|
||||
|
||||
@@ -838,10 +838,6 @@ across all projects). </p>
|
||||
is because the library project is compiled by the main project to use the
|
||||
correct resource IDs.</p>
|
||||
|
||||
<p><strong>One library project cannot reference another</strong></p>
|
||||
|
||||
<p>A library cannot depend on another library.</p>
|
||||
|
||||
<p><strong>A library project can include a JAR library</strong></p>
|
||||
|
||||
<p>You can develop a library project that itself includes a JAR library. When
|
||||
@@ -858,13 +854,6 @@ application must declare the external library their manifest files, in a <a
|
||||
href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code><uses-library></code></a>
|
||||
element. </p>
|
||||
|
||||
<p><strong>Library project cannot include AIDL files</strong></p>
|
||||
|
||||
<p>The tools do not support the use of <a
|
||||
href="{@docRoot}guide/developing/tools/aidl.html">AIDL</a> files in a library project.
|
||||
Any AIDL files used by an application must be stored in the application project
|
||||
itself.</p>
|
||||
|
||||
<p><strong>Library project cannot include raw assets</strong></p>
|
||||
|
||||
<p>The tools do not support the use of raw asset files in a library project.
|
||||
|
||||
BIN
docs/html/images/developing/lib-migration-0.png
Normal file
BIN
docs/html/images/developing/lib-migration-0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
docs/html/images/developing/lib-migration-1.png
Normal file
BIN
docs/html/images/developing/lib-migration-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 91 KiB |
BIN
docs/html/images/developing/lib-migration-2.png
Normal file
BIN
docs/html/images/developing/lib-migration-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -22,11 +22,18 @@ ADT Installation</a>.</p>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.9.7</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.7.zip">ADT-0.9.7.zip</a></td>
|
||||
<td>0.9.8</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.8.zip">ADT-0.9.8.zip</a></td>
|
||||
<td><nobr>{@adtZipBytes} bytes</nobr></td>
|
||||
<td>{@adtZipChecksum}</td>
|
||||
<td>Requires SDK Tools, Revision 6 <em><nobr>May 2010</nobr></em></td>
|
||||
<td>Requires SDK Tools, Revision 7 <em><nobr>September 2010</nobr></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.9.7</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.7.zip">ADT-0.9.7.zip</a></td>
|
||||
<td><nobr>8033750 bytes</nobr></td>
|
||||
<td>de2431c8d4786d127ae5bfc95b4605df</td>
|
||||
<td>Requires SDK Tools, Revision 5 <em><nobr>May 2010</nobr></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.9.6</td>
|
||||
|
||||
@@ -95,7 +95,61 @@ padding: .25em 1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="toggleable opened">
|
||||
<a href="#" onclick="return toggleDiv(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
|
||||
ADT 0.9.8</a> <em>(August 2010)</em>
|
||||
<div class="toggleme">
|
||||
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>Dependencies:</dt>
|
||||
|
||||
<dd><p>ADT 0.9.8 is designed for use with SDK Tools r7 and later. Before
|
||||
updating to ADT 0.9.8, we highly recommend that you use the Android SDK and
|
||||
AVD Manager to install SDK Tools r7 into your SDK.</p></dd>
|
||||
|
||||
<dt>General notes:</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Adds a new Action, "Rename Application Package", to the Android Tools
|
||||
contextual menu. The Action does a full application package refactoring.
|
||||
<li>Adds support for library projects that don't have a source folder
|
||||
called <code>src/</code>. There is now support for any number of source folders,
|
||||
with no name restriction. They can even be in subfolder such as
|
||||
<code>src/java</code>. If you are already working with library projects created
|
||||
in ADT 0.9.7, see <a
|
||||
href="{@docRoot}guide/developing/eclipse-adt.html#libraryMigrating">Migrating
|
||||
library projects to ADT 0.9.8</a> for important information about moving
|
||||
to the new ADT environment.</li>
|
||||
<li>Adds support for library projects that depend on other library
|
||||
projects.</li>
|
||||
<li>Adds support for additional resource qualifiers:
|
||||
<code>car</code>/<code>desk</code>, <code>night</code>/<code>notnight</code> and
|
||||
<code>navexposed</code>/<code>navhidden</code>.</li>
|
||||
<li>Adds more device screen types in the layout editor. All screen
|
||||
resolution/density combinations listed in the <a
|
||||
href="{@docRoot}guide/practices/screens_support.html#range">Supporting
|
||||
Multiple Screens</a> are now available.</li>
|
||||
<li>Fixes problems with handling of library project names that
|
||||
contain characters that are incompatible with the Eclipse path variable.
|
||||
Now properly sets up the link between the main project and the library
|
||||
project.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="toggleable closed">
|
||||
<a href="#" onclick="return toggleDiv(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
|
||||
ADT 0.9.7</a> <em>(May 2010)</em>
|
||||
@@ -120,6 +174,7 @@ project support through the Ant build system.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="toggleable closed">
|
||||
<a href="#" onclick="return toggleDiv(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
page.title=Android SDK
|
||||
sdk.redirect=0
|
||||
|
||||
sdk.win_download=android-sdk_r06-windows.zip
|
||||
sdk.win_bytes=23293160
|
||||
sdk.win_checksum=7c7fcec3c6b5c7c3df6ae654b27effb5
|
||||
sdk.win_download=android-sdk_r07-windows.zip
|
||||
sdk.win_bytes=23669664
|
||||
sdk.win_checksum=69c40c2d2e408b623156934f9ae574f0
|
||||
|
||||
sdk.mac_download=android-sdk_r06-mac_86.zip
|
||||
sdk.mac_bytes=19108077
|
||||
sdk.mac_checksum=c92abf66a82c7a3f2b8493ebe025dd22
|
||||
sdk.mac_download=android-sdk_r07-mac_x86.zip
|
||||
sdk.mac_bytes=19229546
|
||||
sdk.mac_checksum=0f330ed3ebb36786faf6dc72b8acf819
|
||||
|
||||
sdk.linux_download=android-sdk_r06-linux_86.tgz
|
||||
sdk.linux_bytes=16971139
|
||||
sdk.linux_checksum=848371e4bf068dbb582b709f4e56d903
|
||||
sdk.linux_download=android-sdk_r07-linux_x86.tgz
|
||||
sdk.linux_bytes=17114517
|
||||
sdk.linux_checksum=e10c75da3d1aa147ddd4a5c58bfc3646
|
||||
|
||||
@jd:body
|
||||
|
||||
@@ -50,7 +50,7 @@ for Eclipse</a>.</p>
|
||||
<p><strong>4. Add Android platforms and other components to your SDK</strong></p>
|
||||
|
||||
<p>Use the Android SDK and AVD Manager, included in the SDK starter package, to
|
||||
add one or more Android platforms (for example, Android 1.6 or Android 2.0) and
|
||||
add one or more Android platforms (for example, Android 1.6 or Android 2.2) and
|
||||
other components to your SDK. If you aren't sure what to add, see <a
|
||||
href="installing.html#which">Which components do I need?</a></p>
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r6</a>
|
||||
</li>
|
||||
<li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r7</a>
|
||||
<span class="new">new!</span></li>
|
||||
<li><a href="<?cs var:toroot ?>sdk/win-usb.html">USB Driver for
|
||||
Windows, r3</a>
|
||||
</li>
|
||||
@@ -94,7 +94,7 @@
|
||||
<span style="display:none" class="zh-TW"></span>
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 0.9.7
|
||||
<li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 0.9.8
|
||||
<span style="display:none" class="de"></span>
|
||||
<span style="display:none" class="es"></span>
|
||||
<span style="display:none" class="fr"></span>
|
||||
@@ -102,7 +102,7 @@
|
||||
<span style="display:none" class="ja"></span>
|
||||
<span style="display:none" class="zh-CN"></span>
|
||||
<span style="display:none" class="zh-TW"></span></a>
|
||||
</li>
|
||||
<span class="new">new!</span></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -64,6 +64,39 @@ padding: .25em 1em;
|
||||
<div class="toggleable opened">
|
||||
<a href="#" onclick="return toggleDiv(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
|
||||
SDK Tools, Revision 7</a> <em>(September 2010)</em>
|
||||
<div class="toggleme">
|
||||
|
||||
<dl>
|
||||
<dt>Dependencies:</dt>
|
||||
<dd>
|
||||
<p>If you are developing in Eclipse with ADT, note that SDK Tools r7 is
|
||||
designed for use with ADT 0.9.8 and later. After installing SDK Tools r7, we
|
||||
highly recommend updating your ADT Plugin to 0.9.8.</p>
|
||||
</dd>
|
||||
|
||||
<dt>General notes:</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>Added support for library projects that depend on other library projects.</li>
|
||||
<li>Adds support for aidl files in library projects.</li>
|
||||
<li>Adds support for extension targets in Ant build to perform tasks between the
|
||||
normal tasks: <code>-pre-build</code>, <code>-pre-compile</code>, and
|
||||
<code>-post-compile</code>.</li>
|
||||
<li>Adds support for "headless" SDK update. See <code>android -h update sdk</code>
|
||||
for more information.</li>
|
||||
<li>Fixes location control in DDMS to work in any locale not using '.' as a
|
||||
decimal point.</li>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toggleable closed">
|
||||
<a href="#" onclick="return toggleDiv(this)">
|
||||
<img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
|
||||
SDK Tools, Revision 6</a> <em>(May 2010)</em>
|
||||
<div class="toggleme">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user