Stay organized with collections
Save and categorize content based on your preferences.
Android Studio 2.0 (April 2016)
Note: If you are developing for the N Developer Preview, you
should use Android Studio 2.1 Preview. Android Studio 2.0 does not support
all the features required to target the N Preview.
Instant Run:
- Android Studio now deploys clean builds faster than ever before.
Additionally, pushing incremental code changes to the emulator or a physical
device is now almost instantaneous. Review your updates without redeploying a
new debug build or, in many cases, without restarting the app.
<li>Instant Run supports pushing the following changes to a running app:
<ul>
<li>Changes to the implementation of an existing instance method or
static method
</li>
<li>Changes to an existing app resource
</li>
<li>Changes to structural code, such as a method signature or a static
field (requires a target device running API level 21 or higher).
</li>
</ul>
</li>
<li>Read the documentation to learn more <a href=
"/tools/building/building-studio.html#instant-run">about Instant
Run</a>.
<p class="note">
<strong>Note:</strong> Instant Run is supported only when you deploy the
debug build variant, use <a href=
"/tools/revisions/gradle-plugin.html#revisions">Android plugin for
Gradle version 2.0.0</a> or higher, and configure your app's module-level
<code>build.gradle</code> file for <code>minSdkVersion 15</code> or higher.
For the best performance, configure your app for <code>minSdkVersion
21</code> or higher.
</p>
</li>
New additions to Lint:
- Inspection of
switch
statements using @IntDef
annotated integers to make sure
all constants are handled. To quickly add any missing statements, use the
intention action drop-down menu and select Add Missing @IntDef
Constants.
- Flags for incorrect attempts to use string interpolation to insert
version numbers in the
build.gradle
file.
- Flags for anonymous classes that extend the
Fragment
class.
- Flags for native code in unsafe locations, such as the
res/
and asset/
folders.
This flag encourages storing native code in the libs/
folder, which is then securely packaged into the application’s
data/app-lib/
folder at install time. AOSP: #169950
- Flags for unsafe calls to
Runtime.load()
and System.load()
calls. AOSP: #179980
- Find and remove any unused resources by selecting Refactor > Remove
Unused Resources from the menu bar. Unused resource detection now
supports resources only referenced by unused resources, references in raw
files such as
.html
image references, and tools:keep
and
tools:discard
attributes used by the Gradle resource shrinker, while
considering inactive source sets (such as resources used in other build
flavors) and properly handling static field imports.
- Checks that implicit API references are supported on all platforms
targeted by
minSdkVersion
.
- Flags improper usage of
RecyclerView
and Parcelable
.
@IntDef
, @IntRange
, and @Size
inspections are now also checked for
int
arrays and varargs.
Additional Improvements:
- Optimized for Android Emulator 2.0, which is faster than ever before,
supports a wider range of virtual devices, and features a drastically
improved UI. To learn more about the new emulator, read the SDK Tools release notes.
<li>Improvements to the <a href=
"/tools/devices/managing-avds.html">Android Virtual Device
Manager</a>:
<ul>
<li>System images are now categorized under the following tabs:
<em>Recommended</em>, <em>x86</em>, and <em>Other</em>.
</li>
<li>Under advanced settings, you can enable multi-core support and
specify the number of cores the emulator can use.
</li>
<li>Under advanced settings, you can determine how graphics are rendered
on the emulator by selecting one of the following options:
<ul>
<li>
<strong>Hardware:</strong> use you computer's graphics card for
faster rendering.
</li>
<li>
<strong>Software:</strong> use software-based rendering.
</li>
<li>
<strong>Auto:</strong> let the emulator decide the best option. This
is the default setting.
</li>
</ul>
</li>
</ul>
</li>
<li>Improved AAPT packaging times by specifying deploy target before the app
is built. This allows Android Studio to efficiently package only the
resources required by the specified device.
</li>
<li>Added Cloud Test Lab integration to provide on-demand app testing with
the convenience and scalability of a cloud service. Learn more about how you
can <a href="/training/testing/start/index.html#run-ctl">use Cloud
Test Lab with Android Studio</a>.
</li>
<li>Added a preview of the new <a class="external-link" href=
"//tools.android.com/tech-docs/gpu-profiler">GPU Debugger</a>. For graphics
intensive applications, you can now visually step through your OpenGL ES code
to optimize your app or game.
</li>
<li>Added Google App Indexing Test. Add support for URLs, app
indexing, and search functionality to your apps to help drive more
traffic to your app, discover which app content is used most, and attract
new users. Test and validate URLs in your app all within Android
Studio. See <a href=
"/tools/help/app-link-indexing.html">Supporting URLs and App
Indexing in Android Studio</a>.
</li>
<li>Upgrades from the latest IntelliJ 15 release, including improved code
analysis and performance. See <a class="external-link" href=
"https://www.jetbrains.com/idea/whatsnew">What's New in IntelliJ</a> for a
complete description of the new features and enhancements.
</li>
<li>XML editor auto-complete now adds quotations marks when completing
attributes. To check if this option is enabled, open the <b>Setting</b> or
<b>Preferences</b> dialogue, navigate to <b>Editor > General > Smart
Keys</b>, and check the box next to <b>Add quotes for attribute value on
attribute completion</b>. <a class="external-link" href=
"//b.android.com/195113">Issue: 195113</a>
</li>
<li>The XML editor now supports code completion for <a href=
"/topic/libraries/data-binding/index.html#layout_details">data binding</a>
expressions.
</li>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["\u003cbr /\u003e\n\nAndroid Studio 2.0 (April 2016)\n===============================\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n**Note:** If you are developing for the N Developer Preview, you\nshould use Android Studio 2.1 Preview. Android Studio 2.0 does not support\nall the features required to target the N Preview.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n**Instant Run**:\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n- Android Studio now deploys clean builds faster than ever before. Additionally, pushing incremental code changes to the emulator or a physical device is now almost instantaneous. Review your updates without redeploying a new debug build or, in many cases, without restarting the app. \n\n \u003cli\u003eInstant Run supports pushing the following changes to a running app:\n \u003cul\u003e\n \u003cli\u003eChanges to the implementation of an existing instance method or\n static method\n \u003c/li\u003e\n \u003cli\u003eChanges to an existing app resource\n \u003c/li\u003e\n \u003cli\u003eChanges to structural code, such as a method signature or a static\n field (requires a target device running API level 21 or higher).\n \u003c/li\u003e\n \u003c/ul\u003e\n \u003c/li\u003e\n\n \u003cli\u003eRead the documentation to learn more \u003ca href=\n \"/tools/building/building-studio.html#instant-run\"\u003eabout Instant\n Run\u003c/a\u003e.\n \u003cp class=\"note\"\u003e\n \u003cstrong\u003eNote:\u003c/strong\u003e Instant Run is supported only when you deploy the\n debug build variant, use \u003ca href=\n \"/tools/revisions/gradle-plugin.html#revisions\"\u003eAndroid plugin for\n Gradle version 2.0.0\u003c/a\u003e or higher, and configure your app's module-level\n \u003ccode\u003ebuild.gradle\u003c/code\u003e file for \u003ccode\u003eminSdkVersion 15\u003c/code\u003e or higher.\n For the best performance, configure your app for \u003ccode\u003eminSdkVersion\n 21\u003c/code\u003e or higher.\n \u003c/p\u003e\n \u003c/li\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**New additions to Lint:**\n\n- Inspection of `switch` statements using [@IntDef](/reference/androidx/annotation/IntDef) annotated integers to make sure all constants are handled. To quickly add any missing statements, use the intention action drop-down menu and select **Add Missing @IntDef\n Constants**.\n- Flags for incorrect attempts to use string interpolation to insert version numbers in the `build.gradle` file.\n- Flags for anonymous classes that extend the [Fragment](/reference/android/app/Fragment) class.\n- Flags for native code in unsafe locations, such as the `res/` and `asset/` folders. This flag encourages storing native code in the `libs/` folder, which is then securely packaged into the application's `data/app-lib/` folder at install time. [AOSP: #169950](https://android-review.googlesource.com/#/c/169950/)\n- Flags for unsafe calls to [Runtime.load()](/reference/java/lang/Runtime#load(java.lang.String)) and [System.load()](/reference/java/lang/System#load(java.lang.String)) calls. [AOSP: #179980](https://android-review.googlesource.com/#/c/179980/)\n- Find and remove any unused resources by selecting **Refactor \\\u003e Remove\n Unused Resources** from the menu bar. Unused resource detection now supports resources only referenced by unused resources, references in raw files such as `.html` image references, and `tools:keep` and `tools:discard` attributes used by the Gradle resource shrinker, while considering inactive source sets (such as resources used in other build flavors) and properly handling static field imports.\n- Checks that implicit API references are supported on all platforms targeted by `minSdkVersion`.\n- Flags improper usage of [RecyclerView](/reference/androidx/recyclerview/widget/RecyclerView) and [Parcelable](/reference/android/os/Parcelable).\n- [@IntDef](/reference/androidx/annotation/IntDef), [@IntRange](/reference/androidx/annotation/IntRange), and [@Size](/reference/androidx/annotation/Size) inspections are now also checked for `int` arrays and varargs.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**Additional Improvements**:\n\n- Optimized for Android Emulator 2.0, which is faster than ever before, supports a wider range of virtual devices, and features a drastically improved UI. To learn more about the new emulator, read the [SDK Tools release notes](/studio/releases/sdk-tools#notes). \n\n \u003cli\u003eImprovements to the \u003ca href=\n \"/tools/devices/managing-avds.html\"\u003eAndroid Virtual Device\n Manager\u003c/a\u003e:\n \u003cul\u003e\n \u003cli\u003eSystem images are now categorized under the following tabs:\n \u003cem\u003eRecommended\u003c/em\u003e, \u003cem\u003ex86\u003c/em\u003e, and \u003cem\u003eOther\u003c/em\u003e.\n \u003c/li\u003e\n \u003cli\u003eUnder advanced settings, you can enable multi-core support and\n specify the number of cores the emulator can use.\n \u003c/li\u003e\n \u003cli\u003eUnder advanced settings, you can determine how graphics are rendered\n on the emulator by selecting one of the following options:\n \u003cul\u003e\n \u003cli\u003e\n \u003cstrong\u003eHardware:\u003c/strong\u003e use you computer's graphics card for\n faster rendering.\n \u003c/li\u003e\n \u003cli\u003e\n \u003cstrong\u003eSoftware:\u003c/strong\u003e use software-based rendering.\n \u003c/li\u003e\n \u003cli\u003e\n \u003cstrong\u003eAuto:\u003c/strong\u003e let the emulator decide the best option. This\n is the default setting.\n \u003c/li\u003e\n \u003c/ul\u003e\n \u003c/li\u003e\n \u003c/ul\u003e\n \u003c/li\u003e\n\n \u003cli\u003eImproved AAPT packaging times by specifying deploy target before the app\n is built. This allows Android Studio to efficiently package only the\n resources required by the specified device.\n \u003c/li\u003e\n\n \u003cli\u003eAdded Cloud Test Lab integration to provide on-demand app testing with\n the convenience and scalability of a cloud service. Learn more about how you\n can \u003ca href=\"/training/testing/start/index.html#run-ctl\"\u003euse Cloud\n Test Lab with Android Studio\u003c/a\u003e.\n \u003c/li\u003e\n\n \u003cli\u003eAdded a preview of the new \u003ca class=\"external-link\" href=\n \"//tools.android.com/tech-docs/gpu-profiler\"\u003eGPU Debugger\u003c/a\u003e. For graphics\n intensive applications, you can now visually step through your OpenGL ES code\n to optimize your app or game.\n \u003c/li\u003e\n\n \u003cli\u003eAdded Google App Indexing Test. Add support for URLs, app\n indexing, and search functionality to your apps to help drive more\n traffic to your app, discover which app content is used most, and attract\n new users. Test and validate URLs in your app all within Android\n Studio. See \u003ca href=\n \"/tools/help/app-link-indexing.html\"\u003eSupporting URLs and App\n Indexing in Android Studio\u003c/a\u003e.\n \u003c/li\u003e\n\n \u003cli\u003eUpgrades from the latest IntelliJ 15 release, including improved code\n analysis and performance. See \u003ca class=\"external-link\" href=\n \"https://www.jetbrains.com/idea/whatsnew\"\u003eWhat's New in IntelliJ\u003c/a\u003e for a\n complete description of the new features and enhancements.\n \u003c/li\u003e\n\n \u003cli\u003eXML editor auto-complete now adds quotations marks when completing\n attributes. To check if this option is enabled, open the \u003cb\u003eSetting\u003c/b\u003e or\n \u003cb\u003ePreferences\u003c/b\u003e dialogue, navigate to \u003cb\u003eEditor > General > Smart\n Keys\u003c/b\u003e, and check the box next to \u003cb\u003eAdd quotes for attribute value on\n attribute completion\u003c/b\u003e. \u003ca class=\"external-link\" href=\n \"//b.android.com/195113\"\u003eIssue: 195113\u003c/a\u003e\n \u003c/li\u003e\n\n \u003cli\u003eThe XML editor now supports code completion for \u003ca href=\n \"/topic/libraries/data-binding/index.html#layout_details\"\u003edata binding\u003c/a\u003e\n expressions.\n \u003c/li\u003e\n\n\u003cbr /\u003e"]]