As most of the Android developers would be using official IDE (integrated development environment) by Google for an Android app development, updates and enhancements for Android Studio does play an indispensable role in the development phase.

Google has recently announced the beta version of Android Studio 2.0 as a major update coming to developers though the final release date has not yet announced. Android Studio 2.0 features can be experienced by downloading a separate Android Studio 2.0 beta version instance keeping current instance working in parallel. So one can certainly check if the new version of Android Studio resolves problem of running emulators on average or low configuration systems providing the ability to develop apps faster comparatively, ability to test on app on multiple emulators at same time to test on different resolution devices and many more.

What are the new features in Android Studio 2.0?

1. Instant run

2. Improved and faster emulator

3. Google app indexing and testing

4. Faster ADB

5. GPU profiler preview

6. Integration of IntelliJ 15

Instant Run –

instant-run

Android Studio 2.0 has enhanced cold swap feature from Android Studio 2.0 preview version to make it work in different scenarios. It allows you to do code changes and push those to the running app. This would save time to rebuild the whole application to reflect changes done no matter changes are minor or major by pushing only new changes. Depending on type of code or resource changes, instant run will swap the running application in one of the following ways –

Hot swap –

Hot swap is performed when there are code changes for method implementations. App will keep running and changes will be reflected next time when method is called.

Warm swap –

Resource changes (string values changes, color changes etc.) are pushed to the running app via warm swap where it quickly restarts current activity with toast message to notify developer.

Cold swap –

When there is major structural changes in the code, cold swap will restart the running app to reflect changes quickly. Classes hierarchy changes, method signature changes, static initializations etc. falls under cold swap.

(More details about instant run are mentioned at – //tools.android.com/tech-docs/instant-run. There they have mentioned about summary table for which kind changes falls under which type of swap. If we can visually designs something to show this info and here would make our blog bit different than others or by Google’s official blog. Below is screenshot of summary from above link – )

cold-swap

Improved and faster emulator –

Android Studio 2.0 beta version support Android’s new emulator which is faster than earlier and more efficient for different types of apps with core Android features support. Developer can now test core features of Android APIs like pinch and zoom, multi touch events with new emulator and many more. You can set location latitude-longitude, control network settings to test your app for all use cases.

Here is the brand new emulator image for Nexus 6p emulator in Android Studio 2.0 beta.

android-emulator-side-toolbar

Image – Android emulator side toolbar

android-emulator-side-toolbar-extended-options

Image – Android emulator side toolbar extended options

Google app indexing and testing –

Google app indexing helps the developer to make app searchable on Google and navigate user directly to the app content from mobile browser search results. Android Studio 2.0 beta version introduces auto code generation for app indexing implementation and tool to test app indexing feature. Testing app indexing from Android Studio will need Google account sign in.

(More info on deep linking and app indexing at //mobisoftinfotech.com/resources/blog/android-deep-linking-for-better-google-search-visibility/)

Faster ADB –

Android debug bridge (ADB) is made faster by improvising processes from building the app till deploy and install on device which includes dx, Proguard, AAPT and deploy install. Faster merger algorithm to merge all dx files in the project to build the app contributes to make ADB faster. Android Studio 2.0 introduced “Shrinker” which can be used instead of Proguard in debug or development mode still suggested to implement Proguard in release mode. Shrinker skips optimization and obfuscation steps from Proguard and just have shrinker in debug mode to make build process faster. Last but not least – AAPT, Deploy and install made faster as Android Studio 2.0 asks for deploy target even before your app is built. Faster ADB should make development easier and faster with Android Studio 2.0.

GPU profiler preview –

Along with instant run, faster ADB, Android Studio 2.0 has also improved the GPI profiler preview which allows you to debug and inspect app performance frame by frame. So now graphics rich apps can be optimized from performance standpoint too. With the install of Android 2.0 beta version, if GPU profiler preview tool is not installed you can install it from SDK manager as shown in below screenshot –

GPU-profiler-preview

Integration of IntelliJ 15 –

Android Studio 2.0 is built on intelliJ 15 to make it more stable and advanced features as in –

  • Improved debugger and debug editor
  • Improved version control for Git like rebase on git is now feasible from Android Studio 2.0
  • Managing patches for MQ
  • Improved unit testing in Android code

So by looking at set of features and improvements provided by Android Studio 2.0, it does look promising to make development easier and faster allowing developer to focus on app quality and core implementation instead of spending time on issues arose due to IDE limitations or inefficiency.

How to download Android Studio 2.0 beta version keeping current version intact

1. Find out the location of your existing Android Studio instance. On Mac OS, you can find out your current instance in Applications folder. Screenshot –

step1

2. Download desired Android 2.0 beta build from //tools.android.com/download/Studio/beta. You can download build from list of locations mentioned to download respective build (I chosen 2.0 Beta 5 (February 16th, 2016)) for different OS //tools.android.com/download/Studio/builds/2-0-beta-5

3. Install Android 2.0 build recently download and setup your new instance of Android 2.0 beta instance (on Mac you can drag and drop setup file to Applications folder and rename it to Android 2.0 beta if you wish). Your stable channel instance is intact and working.

4. Now you can see two instances in Applications folder on Mac. Screenshot –

FAQ:-

1. Can I keep my current Android Studio instance from stable channel intact and try out Android Studio 2.0 beta version? – Yes. You can keep multiple instances of Android Studio on your system. (ref. above steps).

2. Where can I see the settings in Android Studio for instant run? – You can find out instant run setting for Android 2.0 beta version in “Preferences” as shown in below screenshot. By default instant run is enabled.

2
Author Bio:

Pallavi-Daga

Pallavi Daga is Android Technical Lead at Mobisoft Infotech with 6+ years of experience in mobility development. She has hands on experience in providing mobility solutions to customers and proficient in business analysis. Her keen interest is research and development in various areas of emerging technologies including Internet of things and artificial intelligence.