to a separate guide for people who don't want to develop on N, but simply want to run their current app on N. Change-Id: I7eef70c45cb18d500cb5aa9d4538af12484335af
101 lines
3.6 KiB
Plaintext
101 lines
3.6 KiB
Plaintext
page.title=Run Your App on the N Preview
|
|
meta.keywords="preview", "android"
|
|
page.tags="preview", "developer preview"
|
|
page.image=images/cards/card-n-sdk_2x.png
|
|
|
|
@jd:body
|
|
|
|
<div id="qv-wrapper">
|
|
<div id="qv">
|
|
<ol>
|
|
<li><a href="#setupAVD">Set up a Virtual Device</a></li>
|
|
<li><a href="#setup-device">Set Up a Hardware Device</a></li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<p>If you have an existing Android app and you simply want to run it on the N
|
|
Preview system image, then you need either a virtual device or a supported
|
|
hardware device configured with N Preview system image.</p>
|
|
|
|
<p>Simply installing your app onto the N Preview this way does not require
|
|
any changes to your app source code. If, however, you want to update your
|
|
app to use new APIs in the N Preview and new language features of Java 8,
|
|
then you need to download Android Studio 2.1 (preview) as described in
|
|
<a href="{@docRoot}preview/setup-sdk.html">Set Up to Develop for the
|
|
N Preview</a>.
|
|
|
|
<p>So, although Android Studio 2.1 is required for development with N Preview
|
|
APIs, you can use Android Studio 1.5 or higher if you simply want to run your
|
|
app in the emulator or a connected device.</p>
|
|
|
|
|
|
<h2 id="setupAVD">Set up a Virtual Device</h2>
|
|
|
|
<p>To use the Android Emulator to run the N Preview you need to download
|
|
the Android N Preview SDK and create a virtual device for the emulator.
|
|
</p>
|
|
|
|
<p>First, downloaded the Android N Preview SDK as follows (if you
|
|
already got it while <a href="{@docRoot}preview/setup-sdk.html">setting up
|
|
Android Studio 2.1</a>, you can skip this part):
|
|
|
|
<ol>
|
|
<li>In Android Studio, open the Settings dialog
|
|
(<strong>File > Settings</strong> on Windows/Linux, or
|
|
<strong>Android Studio > Preferences</strong> on Mac). In the left
|
|
panel, select <strong>Appearance & Behavior >
|
|
System Settings > Android SDK</strong>.
|
|
|
|
<li>Click the <strong>SDK Platforms</strong> tab, then select the
|
|
<strong>Android N Preview</strong> check box.</li>
|
|
|
|
<li>Click the <strong>SDK Tools</strong> tab, then select the
|
|
<strong>Android SDK Build Tools</strong>, <strong>Android SDK
|
|
Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
|
|
boxes.
|
|
</li>
|
|
|
|
<li>Click <strong>OK</strong> and accept the license
|
|
agreements for any packages to be installed.
|
|
</li>
|
|
</ol>
|
|
|
|
|
|
<p>Now create a virtual device with the N Preview system image:</p>
|
|
|
|
<ol>
|
|
<li>Open the AVD Manager by selecting <strong>Tools > Android >
|
|
AVD Manager</strong>.</li>
|
|
<li>Click <strong>Create Virtual Device</strong>.</li>
|
|
<li>Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV,
|
|
then click <strong>Next</strong>.</li>
|
|
<li>Select the <strong>N</strong> system image (with the
|
|
<strong>x86</strong> ABI), then click <strong>Next</strong>.
|
|
<li>Complete the rest of the AVD configuration and click
|
|
<strong>Finish</strong>.</li>
|
|
</ol>
|
|
|
|
<p>You can now launch the Android Emulator with the Android N Preview AVD.</p>
|
|
|
|
<p>For more information about creating virtual devices, see <a href=
|
|
"{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.
|
|
</p>
|
|
|
|
|
|
|
|
<h2 id="setup-device">Set Up a Hardware Device</h2>
|
|
|
|
<p>If you have a Nexus 5X, Nexus 6P, Nexus 9, Pixel C, or Nexus Player, you can
|
|
install the N Preview for testing your app.</p>
|
|
|
|
<p class="caution">
|
|
<strong>Important:</strong> Installing a preview image on a device
|
|
<em>removes all data from it</em>, so you should backup any data before
|
|
installing a preview image.
|
|
</p>
|
|
|
|
<p><strong>TODO(smain/joefernandez): Merge as appropriate with <a href=
|
|
"{@docRoot}preview/download.html">Image Downloads and OTA
|
|
Updates</a>.</strong></p>
|