Showing posts with label Android Studio. Show all posts
Showing posts with label Android Studio. Show all posts

Friday, October 26, 2018

Quick Kicking & The Summit Features Inwards The Android Emulator

Posted past times Jamal Eason, Product Manager, Android

Today, nosotros are excited to denote Quick Boot for the Android Emulator. With Quick Boot, y'all tin sack launch the Android Emulator inwards nether half dozen seconds. Quick Boot industrial plant past times snapshotting an emulator session therefore y'all tin sack reload inwards seconds. Quick Boot was showtime released amongst Android Studio 3.0 inwards the canary update channel in addition to nosotros are excited to unloose the characteristic equally a stable update today.

In improver to this novel feature, nosotros also wanted to highlight unopen to of the top features from recent releases. Since the consummate revamp of the Android Emulator two years ago, nosotros choke on to focus on improving speed, stability in addition to adding a rich gear upwardly of features that accelerate your app evolution in addition to testing. With all the recent changes, it is definitely worth updating to the latest version of the Android Emulator to role it today.

Top v Features

  • Quick Boot - Released equally a stable characteristic today, Quick Boot allows y'all to resume your Android Emulator session inwards nether half dozen seconds. The showtime fourth dimension y'all begin an Android Virtual Device (AVD) amongst the Android Emulator, it must perform a mutual depression temperature kicking (just similar powering on a device), but subsequent starts are fast in addition to the organisation is restored to the nation at which y'all closed the emulator finally (similar to waking a device). We accomplished this past times completely re-engineering the legacy emulator snapshot architecture to locomote amongst virtual sensors in addition to GPU acceleration. No additional setup is required because Quick Boot is enabled past times default starting amongst Android Emulator v27.0.2.

Quick Boot inwards the Android Emulator

  • Android CTS Compatibility - With each unloose of the Android SDK, nosotros ensure that the Android Emulator is create for your app evolution needs, from testing backwards compatibility amongst Android KitKat to integrating the latest APIs of the developer preview. To increase production character in addition to reliability of emulator organisation images, nosotros at 1 time qualify terminal Android System Image builds from Android Nougat (API 24) in addition to higher against the Android Compatibility Test Suite (CTS)—the same testing suite that official Android physical devices must pass.
  • Google Play Support - We know that many app developers role Google Play Services, in addition to it tin sack live on hard to maintain the service upwardly to appointment inwards the Android Emulator organisation images. To solve this problem, nosotros at 1 time offering versions of Android System Images that include the Play Store app. The Google Play images are available starting amongst Android Nougat (API 24). With these novel emulator images, y'all tin sack update Google Play Services via the Play Store app inwards your emulator only equally y'all would on a physical Android device. Plus, y'all tin sack at 1 time examination end-to-end install, update, in addition to buy flows amongst the Google Play Store.
  • Performance Improvements - Making the emulator fast in addition to performant is an on-going destination for our team. We continuously await at the functioning comport on of running the emulator on your evolution machine, peculiarly RAM usage. With the latest versions of the Android Emulator, nosotros at 1 time allocate RAM on demand, instead of allocating in addition to pinning the retentivity to the max RAM size defined inwards your AVD. We produce this past times tapping into the native hypervisors for Linux (KVM) in addition to macOS® (Hypervisor.Framework), in addition to an enhanced Intel® HAXM (v6.2.1 in addition to higher) for Microsoft® Windows®, which uses the novel on-demand retentivity allocation.
  • Additionally, over the finally several releases, nosotros accept improved CPU in addition to I/O functioning land enhancing GPU performance, including OpenGL ES 3.0 support. Looking at a mutual job such equally ADB force highlights the improvements inwards the Android CPU in addition to I/O pipelines:

    ADB Push Speed Comparison amongst Android Emulator

    For GPU performance, nosotros created a sample GPU emulation stress examination app to approximate improvements over time. We institute that the latest emulator tin sack homecoming higher frame rates than before, in addition to it is 1 of the few emulators that tin sack homecoming OpenGL ES 3.0 accurately per the Android specification.

GPU Emulation Stress Test - Android App

GPU Emulation Stress Test amongst Android Emulator

More Features

In improver to these major features, at that spot are a whole host of additional features that nosotros accept added to the Android Emulator over the finally yr that y'all may non live on aware of:

  • Wi-Fi support - Starting amongst API 24 organisation images, y'all tin sack create an AVD that both connects to a virtual cellular network in addition to a virtual Wi-Fi Access Point.
  • Google Cast back upwardly - When using a Google Play organisation image, y'all tin sack cast concealment in addition to good content to Chromecast devices on the same Wi-Fi network.
  • Drag in addition to driblet APKs & files - Simply drag an APK onto the Android Emulator window to trigger an app install. Also y'all tin sack drag whatsoever other information file in addition to honour it inwards the /Downloads folder inwards your Android Virtual Device.
  • Host re-create & glue - You tin sack re-create & glue text betwixt the Android Emulator in addition to your evolution machine.
  • Virtual 2-finger pinch & zoom - When interacting amongst apps similar Google Maps, concur downward the Ctrl Key (on Microsoft® Windows® or Linux) or ⌘ (on macOS® ) , in addition to a finger overlay appears on concealment to aid amongst pinch & zoom actions.
  • GPS place - Manually direct a GPS signal or gear upwardly of GPS points nether the Location tab of the Android Emulator.
  • Virtual sensors - There is a dedicated page inwards the extended controls panel that has supported sensors inwards the Android Emulator including acceleration, rotation, proximity in addition to many more.
  • WebCam back upwardly - You tin sack role a webcam or your laptop built-in webcam equally a virtual photographic telly camera inwards the AVD. Validate your AVD photographic telly camera settings inwards the Advanced Settings page inwards the AVD Manager.
  • Host machine keyboard - You tin sack role your existent keyboard to larn into text into the Android Virtual Device.
  • Virtual SMS in addition to telephone calls - In the extended controls panel, y'all tin sack trigger a virtual SMS or telephone phone telephone to examination apps amongst telephony dependencies.
  • Screen zooming - On the master copy toolbar, click on the magnify drinking glass icon to larn into zoom mode, in addition to and therefore direct a part of the concealment y'all wish to inspect.
  • Window resizing - Simply drag a corner of the Android Emulator window to modify to the desired size.
  • Network proxy support - Add a custom HTTP proxy for your Android Emulator session past times going to the Settings page nether the Proxy tab.
  • Bug reporting - You tin sack speedily generate a põrnikas study for your app past times using the Bug Report department inwards the extended controls panel to percentage amongst your squad or to post feedback to Google.

Learn to a greater extent than well-nigh the Android Emulator inwards the Emulator documentation.

Getting Started

All of these features in addition to improvements are available to download in addition to role at 1 time amongst Android Emulator v27.0.2+, which y'all tin sack larn via the SDK Manager inwards Android Studio. For a fast experience, nosotros recommend creating in addition to running the x86 version of emulator organisation images, amongst the latest Android Emulator, Intel® HAXM (if applicable) in addition to graphics drivers installed.

We appreciate whatsoever feedback on things y'all like, issues or features y'all would similar to see. If y'all honour a bug, issue, or accept a characteristic asking experience complimentary to file an issue. We are definitely non done, but nosotros promise y'all are excited well-nigh the improvements therefore far.

Saturday, October 20, 2018

Android Studio 3.1

Posted past times Jamal Eason, Product Manager, Android

We are excited to denote that Android Studio 3.1 is forthwith available to download inwards the stable unloose channel. The focus areas for this unloose are around production character in addition to app evolution productivity. In add-on to many underlying character changes, nosotros added several novel features into Android Studio 3.1 that yous should integrate into your evolution flow.

New to Android Studio 3.1 is a C++ functioning profiler to aid troubleshoot functioning bottlenecks inwards your app code. For those of yous alongside a Room or SQLite database inwards their your app, nosotros added amend code editor back upward to assist inwards your SQL tabular array in addition to inquiry creation statements. We also added amend lint back upward for your Kotlin code, in addition to accelerated your testing alongside an updated Android Emulator alongside Quick Boot. If whatever of these features audio exciting or yous are looking for the adjacent stable version of Android Studio, yous should download Android Studio 3.1 today!

Check out the listing of novel features inwards Android Studio 3.1 below, organized past times cardinal developer flows.

What's novel inwards Android Studio 3.1

Develop

  • Kotlin Lint Checks - Since announcing official Kotlin linguistic communication support final yr on the Android platform, nosotros conk along to invest inwards Kotlin linguistic communication back upward inwards Android Studio. In Android Studio 3.1, nosotros enhanced the Lint code character checks in addition to therefore that forthwith yous tin sack run them via the command problem every bit good every bit from the IDE. Just opened upward a Android Studio project, in addition to run gradlew lint via command line. Learn more.

Kotlin Lint checks via command problem

  • Database Code Editing - Editing inline SQL/Room Database code inwards your Android projection is forthwith fifty-fifty easier alongside Android Studio 3.1. This unloose has SQL code completion inwards your @Query declarations, amend SQL tilt refactoring, in addition to SQL code navigation across your project. Learn more.

Room Database code completion

  • IntelliJ Platform Update: Android Studio 3.1 includes the IntelliJ 2017.3.3 platform release, which has many novel features such every bit novel Kotlin linguistic communication intentions in addition to built-in back upward for SVG icon preview. Learn more.

Build

  • D8 Dex Compiler - D8 is forthwith the default dex compiler inwards Android Studio 3.1. Replacing the legacy DX compiler, D8 dexing is an nether the hood APK compilation pace that makes your app size smaller, enables accurate pace debugging, in addition to many times leads to faster builds. Ensure that your gradle.properties either has no android.enableD8 flag, or if it does ensure that it is laid to true. Learn more.
  • New Build Output Window - Android Studio 3.1 has an updated Build output window which organizes construct condition in addition to errors inwards a novel tree view. This modify also consolidates the legacy Gradle output into this novel window. Learn more.

New Build Output Window

Test

  • Quick Boot - Quick Boot allows yous to resume your Android Emulator session inwards nether vi seconds. Slow initiative of all fourth dimension on the Android Emulator was a major hurting indicate nosotros heard from yous in addition to Quick Boot solves this issue. Like a physical Android device, the emulator must perform an initial mutual coldness boot, simply subsequent starts are fast. The characteristic is enabled past times default for all Android Virtual Devices. Additionally, inwards this release, yous convey finer grain controls of when to role Quick Boot in addition to the mightiness to relieve the quick kick soil on involve nether the emulator settings page. Learn to a greater extent than of other come about Android Emulator Features.

Quick Boot On Demand Setting

  • System Images in addition to Frameless Device Skins - The latest version of the Android Emulator forthwith supports the Google Play Store in addition to Google APIs on API 24 (Nougat) - API 27 (Oreo) emulator systems images every bit good every bit the P Developer Preview. Additionally the device emulator skins are updated to operate inwards a novel frameless mode, which tin sack aid yous exam your app alongside 18:9 concealment aspect ratios, or Android P Developer Preview DisplayCutout APIs. Learn more.

Window frameless fashion inwards the Android Emulator

Optimize

  • C++ CPU Profiling - Last yr alongside Android Studio 3.0, nosotros launched a gear upward novel laid of Android profilers to mensurate the CPU, Memory, in addition to Network Activity inwards your app. With Android Studio 3.1, inwards add-on to functioning profiling your Kotlin in addition to Java linguistic communication app code, yous tin sack forthwith profile your C++ code inwards your app. Using simpleperf every bit backend, the C++ profiler allows yous to tape C++ method traces. Learn more.

C++ CPU Profiler

  • Network Profiler Updates: Threads & Network Request - To assist alongside analyzing network traffic inwards your app, nosotros added a novel Network Thread sentiment to inspect multithreaded network traffic, in addition to nosotros also added a novel Network Request tab to dig into the network requests over time. With these updates to the Network Profiler yous volition convey additional tools to draw the network traffic from each thread in addition to network asking all the means downwards through the network telephone band stack. Learn more.

Network Profiler alongside thread back upward

To recap, Android Studio 3.1 includes these novel major features:

Develop

  • Kotlin Lint Checks
  • Database Code Editing
  • IntelliJ Platform Update

Build

  • D8 Dex Compiler
  • New Build Output Window

Test & Debug

  • Quick Boot for Android Emulator
  • API 27 alongside Google Play Emulator System Images
  • Window frameless fashion for Android Emulator

Optimize

  • C++ Profiler
  • Network Profiler - Thread Support
  • Network Profiler - Request Support

Check out the release notes for to a greater extent than details.

Getting Started

Download

If yous are using a previous version of Android Studio, yous tin sack upgrade to Android Studio 3.1 today or yous tin sack download the update from the official Android Studio download page.

We appreciate whatever feedback on things yous like, issues or features yous would similar to see. If yous honour a põrnikas or issue, experience gratuitous to file an issue. Connect alongside us -- the Android Studio evolution squad ‐ on our Google+ page or on Twitter.

Friday, October 19, 2018

Android Studio Switching To D8 Dexer

Android Studio Switching To D8 Dexer

Posted past times Jeffrey van Gogh, Software Engineering Manager

D8 right away default dex compiler

Faster, smarter app compilation is ever a destination for the Android tools teams. That's why nosotros previously announced D8, a next-generation dex compiler. D8 runs faster in addition to produces smaller .dex files alongside equivalent or improve runtime functioning when compared to the historic compiler - DX.

We lately announced that D8 has instruct the default compiler inwards Android Studio 3.1. If you lot haven't previously tried D8, nosotros promise that you lot abide by better, faster dex compilation equally you lot brand the switch.

D8 was laid about shipped inwards Android Studio 3.0 equally an opt-in feature. In improver to our ain rigorous testing, we've right away seen it perform good inwards a broad multifariousness of apps. As a result, we're confident that D8 volition move good for everyone who starts using it inwards 3.1. However, if you lot hit bring issues, you lot tin ever revert to DX for right away via this setting inwards your project's gradle.properties file:

android.enableD8=false 

If you lot hit run into something that causes you lot to disable D8, delight let us know!

Next Steps

Our destination is to ensure that everyone has access to a fast, right dex compiler. So to avoid risking regressions for whatever of our users, we'll live on deprecating DX inwards 3 phases

The laid about stage is intended to forestall prematurely deprecating DX. During this phase, DX volition rest available inwards studio. We'll create critical issues inwards it, only in that place won't live on novel features. This stage volition finally for at to the lowest degree 6 months, during which we'll evaluate whatever opened upwards D8 bugs to create upwards one's hear if in that place are regressions which would forestall roughly users from replacing DX alongside D8. The laid about stage won't terminate until the squad addresses all migration blockers. We'll live on paying extra attending to the põrnikas tracker during this window, in addition to thence If you lot run into whatever of these regressions, delight file an issue.

Once we've seen a 6 calendar month window without major regressions from DX to D8, we'll move into the minute phase. This stage volition finally for a year, in addition to is intended to ensure that fifty-fifty complex projects bring lots of fourth dimension to migrate. During this phase, we'll hold DX available, only we'll process it equally fully deprecated; nosotros won't live on fixing whatever issues.

During the 3rd in addition to concluding phase, DX volition live on removed from Android Studio. At this point, you'll necessitate to role a legacy version of the Android Gradle Plugin inwards gild to buy the farm on to construct alongside DX.

Tuesday, October 16, 2018

Android Studio 3.2 Canary

Today at Google I/O 2018 nosotros announced the latest preview of Android Studio 3.2 which includes an exciting laid of features that back upwards the Android P Developer Preview, the novel Android App Bundle, as well as Android Jetpack. Download Android Studio 3.2 from our canary release channel today to explore ane of the most characteristic rich releases of the year.

Android Jetpack is a laid of libraries, developer tools as well as architectural guidance to aid teach far quick as well as tardily to build neat Android apps. It provides mutual infrastructure code thence yous tin focus on what makes your app unique. Android Studio 3.2 includes a broad laid of tools that back upwards Jetpack from a visual Navigation Editor that uses the Navigation API, templates for Android Slices APIs, to refactoring tools to migrate to the novel Android back upwards libraries inwards Jetpack — AndroidX.

The canary fourteen release of Android Studio 3.2 also supports the novel Android app model that is the evolution of the APK format, the Android App Bundle. With no code changes, Android Studio 3.2 volition aid yous create a novel Android App Bundle as well as stimulate got it prepare for publishing on Google Play.

There are xx major features inwards this release of Android Studio spanning from ultra fast Android Emulator Snapshots, Sample Data inwards the Layout Editor, to a create novel Energy Profiler to stair out battery comport upon of your app. If whatever of these features sound interesting, download the preview of Android Studio 3.2 today.

To meet these features demoed inwards activity as well as to teach a sneak peak at other features nosotros are working on, depository fiscal establishment stand upwards for out the Google I/O 2018 session - What's novel inwards Android Development Tools.

What’s novel inwards Android Development Tools - Google I/O 2018

Below is a total listing of novel features inwards Android Studio 3.2, organized yesteryear substitution developer flows.

Develop

  • Navigation Editor - As a role of Jetpack, Android Studio 3.2 features a novel means to pattern the navigational construction betwixt the screens of your app. The navigation editor is a visual editor which allows yous to create XML resources that back upwards using the novel Navigation Component inwards Jetpack.

Navigation Editor



  • AndroidX Refactoring Support - One of the components of Jetpack is rethinking as well as refactoring the Android Support Libraries to a novel Android extension library (AndroidX) namespace. As a role of the early on preview of the AndroidX, Android Studio 3.2 helps yous through this migration alongside a novel refactoring action. To utilisation the feature, navigate to: RefactorRefactor to AndroidX. As an additional enhancement to the refactoring process, if yous stimulate got whatever maven dependencies that stimulate got non migrated to the AndroidX namespace, the Android Studio build organisation volition automatically convert those projection dependencies every bit well. You tin manually command the conversion procedure yesteryear toggling the android.enableJetifier = true flag inwards your gradle.properties file. While the refactoring activity supports mutual projection configurations, nosotros recommend that yous salvage a backup of your projection earlier yous refactor. Learn more.

AndroidX Refactoring Support



  • Sample Data - Many Android layouts stimulate got runtime information that tin teach far hard to visualize the expect as well as experience of a layout during the pattern phase of app development. Sample Data inwards the Layout Editor allows yous to utilisation placeholder information to assistance inwards the pattern of your app. From RecyclerView, ImageView to TextView, yous tin add together built-in sample information to populate these views via a popup-window inwards the Layout Editor. To campaign out the feature, add together a RecyclerView to a novel layout, as well as and thence click on the novel tools design-time attributes icon as well as conduct a choice out of the carousel of sample information templates.

Design Time Sample Data



  • Material Design Update - Material Design continues to evolve non solely every bit a pattern organisation simply also inwards implementation on Android. When yous starting fourth dimension migrating from the Android Design back upwards library to the novel MaterialComponents app subject as well as library, Android Studio 3.2 volition offering yous access to novel as well as updated widgets such every bit BottomAppBar, buttons, cards, text fields, novel font styles as well as more. Learn more.

New Material Design Components



  • Slices back upwards - Slices is a novel means to embed portions of your app content inwards other user interface surfaces inwards the Android operating system. Slices is backwards compatible to Android 4.4 KitKat (API 19) as well as volition enable yous to surface app content inwards Google Search suggestions. Android Studio 3.2 has a built inwards template to aid yous extend your app alongside the novel Slice Provider APIs every bit good every bit novel lint checks to ensure that you're next best practices when constructing the slices. To teach started right-click on a projection folder, as well as navigate to NewOtherSlice Provider. Learn how to exam your piece interactions yesteryear checking out the getting started guide.

Slices Provider Template



  • CMakeList Editing Support - Android Studio supports CMake build scripts for your app's C/C++ code. With this release of Android Studio 3.2, code completion as well as syntax highlighting instantly industrial plant on mutual CMakeList commands.

CMakeList Code Completion



  • What's New Assistant - Android Studio 3.2 has a novel assistant panel that opens automatically after an update to inform yous virtually the latest changes to the IDE. You tin also opened upwards the panel yesteryear navigating to Help → What's New inwards Android Studio.

What's New Assistant



  • IntelliJ Platform Update - Android Studio 3.2 includes the IntelliJ 2018.1 platform release, which has many novel features such every bit information menstruum analysis, partial Git commits support, as well as a ton of novel code analysis enhancements. Learn more.

Build

  • Android App Bundle- The Android App Bundle is the novel app publishing format designed to aid yous deliver smaller APKs to your users. Google Play has a novel Dynamic Delivery platform that accepts your Android App Bundle, as well as delivers solely the APKs that yous bespeak on a specific device. Android Studio 3.2 enables yous to create as well as exam an Android App Bundle. As long every bit yous are running the latest Android Gradle plugin (com.android.tools.build:gradle:3.2.0-alpha14), yous tin rebuild your code every bit an app packet as well as teach the do goodness of smaller APKs based on language, enshroud density, as well as ABIs alongside no changes to your app code. To teach started, navigate to Build Build Bundle / APK or BuildGenerate Signed Bundle / APK Learn more.

Build Android App Bundle



  • D8 Desugaring - In about cases, novel Java Language features require novel bytecodes as well as linguistic communication APIs, soundless older Android devices may non back upwards these features. Desugaring allows yous to utilisation these features on older devices yesteryear replacing novel bytecodes as well as linguistic communication APIs alongside older ones during the build process. Desugaring was initially introduced alongside Android Studio 3.0 every bit a kind tool, as well as inwards Android Studio 3.1, nosotros integrated the desugaring stair into the D8 tool every bit an experimental feature, reducing overall build time. Now D8 desugaring is turned on yesteryear default for Android Studio 3.2. You tin yous tin instantly utilisation most of the latest linguistic communication changes spell targeting older devices.
  • R8 Optimizer - During the app build process, Android Studio historically used ProGuard to optimize as well as shrink Java linguistic communication bytecode. Starting alongside Android Studio 3.2, nosotros are starting the transition to utilisation R8 every bit a replacement to ProGuard. To experiment alongside R8, add together android.enableR8=true to your gradle.properties file. R8 is soundless experimental, thence nosotros do non recommend publishing your app using R8 yet. Learn more.

Enable R8 inwards Android Studio


Test

  • Emulator Snapshots - With Quickboot inwards the Android Emulator nosotros enabled yous to launch the emulator inwards nether vi seconds. With Android Studio 3.2 nosotros stimulate got extended this characteristic to enable yous to create snapshots at whatever emulator dry reason as well as starting fourth dimension them iun nether two seconds. When testing as well as developing your app, yous tin pre-configure an Android Virtual Device (AVD) snapshot alongside the presets, apps, information as well as settings that yous desire in-place, as well as repeatedly teach dorsum to the same snapshot. Snapshots charge inwards nether two seconds as well as yous tin launch to specific snapshots from the Android Emulator Extended Controls panel, the command-line ( ./adb emu avd snapshot charge snap_2018-04-29_00-01-12 ) or from within Android Studio.

Android Emulator Snapshots



  • Screen Record inwards Android Emulator - Normally creating a enshroud recording of your app enshroud would solely move for Android 4.4 KitKat (API 19) as well as higher upwards alongside no audio, alongside express Android Emulator support. With the latest Android Emulator (v27.3+), yous tin bring enshroud recordings on whatever API score alongside audio. Plus, at that topographic point is a built-in conversion to output to GIF as well as WebM. You tin trigger the novel enshroud tape characteristic via the Android Emulator Extended Controls panel, command line ( ./adb emu screenrecord starting fourth dimension --time-limit 10 /sample_video.webm ), as well as from Android Studio.

Screen tape inwards Android Emulator



  • Virtual Scene Camera for Android Emulator - Developing as well as testing apps alongside ARCore is instantly fifty-fifty easier alongside the novel Virtual Scene camera, which allows yous to iterate on your augmented reality (AR) experience within a virtual environment. The emulator is calibrated to move alongside ARCore APIs for AR apps as well as allows yous to inject virtual scene bitmap images. The virtual scene photographic television set camera tin also survive used every bit a regular HAL3 compatible camera. Open the built-in Android photographic television set camera app within the Android Emulator to teach started. By default, the novel virtual scene photographic television set camera is the nurture photographic television set camera for novel Android Virtual Devices created alongside Android Studio 3.2. Learn more.

Virtual Scene Camera inwards Android Emulator



  • ADB Connection Assistant - To aid troubleshoot your Android device connections via ADB, Android Studio 3.2 has a novel assistant. The ADB Connection Assistant walks yous through mutual troubleshooting steps to connect your Android device to your evolution machine. You tin trigger the assistant from the Run Dialogue box or yesteryear navigating to ToolsConnection Assistant .

ADB Connection Assistant



Optimize

  • Energy Profiler - Battery life is a substitution job concern for many telephone users, as well as your app may comport upon battery life to a greater extent than than yous realize. The novel Energy Profiler inwards the surgery profiler suite tin aid yous sympathize the loose energy comport upon of your app on an Android device. You tin instantly visualize the estimated loose energy usage of organisation components, plus inspect background events that may contribute to battery drain. To utilisation the loose energy profiler, ensure yous are connected to an Android device or emulator running Android 8.0 Oreo (API 26) or higher. Learn more.

Energy Profiler

  • System Trace - The novel System Trace characteristic inwards the CPU Profiler allows yous to inspect how your app interacts alongside organisation resources inwards fine-grained detail. Inspect exact timings as well as durations of your thread states, visualize where your CPU bottlenecks are across all cores, as well as add together custom line events to analyze. To utilisation organisation trace, starting fourth dimension profiling your app, click into the CPU Profiler, as well as and thence conduct the System Trace recording configuration. Learn more.

System Trace

  • Profiler Sessions - We instantly automatically salvage Profiler information every bit "sessions" to revisit as well as inspect later on spell yous stimulate got Android Studio open. We've also added the might to import as well as export your CPU recordings as well as heap dumps for later on analysis or inspection alongside other tools.

Profiler Sessions



  • Automatic CPU Recording - You tin instantly automatically tape CPU activity using the Debug API. After yous deploy your app to a device, the profiler automatically starts recording CPU activity when your app calls startMethodTracing(String tracePath), as well as stops recording when your app calls stopMethodTracing(). Similarly, yous tin also instantly automatically starting fourth dimension recording CPU activity on app start-up yesteryear enabling this alternative inwards your run configuration.
  • JNI Reference Tracking - For those of yous who stimulate got C/C++ code inwards your Android app, Android Studio 3.2 instantly allows yous to inspect the retention allocations of your JNI code inwards the Memory Profiler. As long every bit yous deploy your app to a device running Android 8.0 Oreo (API 26) as well as higher, yous tin drill downwards into the allotment telephone band stack from your JNI reference. To utilisation the feature, starting fourth dimension a retention profiler session, as well as select the JNI Heap from the Live Allocation drop-down menu.

JNI Reference Tracking

To recap, the latest canary of Android Studio 3.2 includes these novel major features:

Develop
  • Navigation Editor
  • AndroidX Refactoring
  • Sample Data
  • Material Design Update
  • Android Slices
  • CMakeList editing
  • What's New Assistant
  • New Lint Checks
  • Intellij Platform Update


Build

  • Android App Bundle
  • D8 Desugaring
  • R8 Optimizer


Test
  • Android Emulator Snapshots
  • Screen Record inwards Android Emulator
  • Virtual Scene Android Emulator Camera
  • ADB Connection Assistant


Optimize

  • Energy Profiler
  • System Trace
  • Profiler Sessions
  • Automatic CPU Recording
  • JNI Reference Tracking


Check out the preview release notes for to a greater extent than details.

Getting Started

Download

Download the latest version of Android Studio 3.2 from the canary channel download page. If yous are using a previous canary release of Android Studio, create certain yous update to Android Studio Canary fourteen or higher. If yous desire to keep a stable version of Android Studio, yous tin run the stable release version as well as canary release versions of Android Studio at the same time. Learn more.

To utilisation the mentioned Android Emulator features create certain yous are running at to the lowest degree Android Emulator v27.3+ downloaded via the Android Studio SDK Manager.

We appreciate whatever early on feedback on things yous like, as well as issues or features yous would similar to see. Please note, to ensure nosotros keep production quality, the features yous meet inwards the canary channel may non survive available inwards the side yesteryear side stable release channel until they are prepare for stable usage. If yous detect a põrnikas or issue, experience costless to file an issue. Connect alongside us -- the Android Studio evolution squad ‐ on our Google+ page or on Twitter.

Thursday, October 11, 2018

Android Studio 3.2 Beta

Posted yesteryear Jamal Eason, Product Manager, Android

Starting today, you lot tin download Android Studio 3.2 Beta. Previewed at Google I/O 2018, the latest release of the official Android IDE is focused on helping onboard you lot to all the novel features launched around Google I/O -- Android JetPack, Android P Developer Preview, together with the novel Android App Bundle format. There are also several other exciting novel features included inwards Android Studio 3.2 to accelerate your app development, such equally Emulator Snapshots together with the Energy Profiler.

As the usage of Android Studio has grown inwards the 3.5 years since version 1.0, nosotros receive got also give-up the ghost increasingly obsessed amongst quality. We give-up the ghost on to invest inwards character because nosotros know that millions of app developers pass almost everyday inwards Android Studio together with demand a reliable laid of tools. Stability, orbit times, together with other character piece of job volition survive the primary focus for our adjacent release i time nosotros complete Android Studio 3.2. We also did non desire to wait, thence nosotros receive got made checkins to address memory leaks together with functioning issues equally good equally fixed to a greater extent than than 450 bugs. Thank you lot for the continued feedback together with delight maintain it coming thence nosotros tin focus on the areas you lot tending close most inwards the adjacent version of Android Studio. If desire to endeavor out the latest features, together with assess the improvements inwards quality, you lot tin download Android Studio on the beta release channel.

What is within of Android Studio 3.2

Building on the canary release of Android Studio 3.2, the Beta release includes:

  • Android App Bundle back upward - The Android App Bundle is a novel publishing format that uses the Google Play's Dynamic Delivery, which delivers a smaller, optimized APK that alone contains the resources needed for a specific device. Without whatever code changes, you lot tin accept payoff of the app size savings of an Android App Bundle yesteryear navigating to Build Build Bundle / APK or BuildGenerate Signed Bundle / APK.

Build Android App Bundle

  • Emulator Snapshots - With Android Studio 3.2 you lot tin orbit snapshots at whatever emulator country together with and then inaugural of all a snapshot inwards nether 2 seconds. You tin pre-configure an Android Virtual Device (AVD) snapshot amongst the apps, information together with settings that you lot desire together with and then repeatedly give-up the ghost dorsum to the same snapshot. Learn more.

Android Emulator Snapshots

  • Energy Profiler - The novel Energy Profiler inwards the functioning profiler suite tin assist you lot empathize the unloose energy touching of your app on an Android device. You tin forthwith visualize the estimated unloose energy usage of organization components, addition inspect background events that may contribute to battery drain.

Energy Profiler

Check out the total write-up of all the major features organized yesteryear evolution menstruum listed below together with on the canary blog:

Develop

  • Navigation Editor
  • AndroidX Refactoring
  • Sample Data
  • Material Design Update
  • Android Slices
  • CMakeList editing
  • What's New Assistant
  • New Lint Checks
  • Intellij Platform Update

Build

  • Android App Bundle
  • D8 Desugaring
  • R8 Optimizer
Test
  • Android Emulator Snapshots
  • Screen Record inwards Android Emulator
  • Virtual Scene Android Emulator Camera
  • ADB Connection Assistant

Optimize

  • Energy Profiler
  • System Trace
  • Profiler Sessions
  • Automatic CPU Recording
  • JNI Reference Tracking

Sessions at Google I/O '18

With the release of Android Studio 3.2 at Google I/O '18, the Android Studio squad also presented a serial of sessions close Android Studio. Watch the next videos to encounter the latest features inwards activity together with to larn tips & tricks on how to usage Android Studio:

  • What's novel inwards Android evolution tools

    An overview of all the recent features inwards Android Studio for Android app developers. The session includes demos together with a tour de strength presentation of relevant features that volition accelerate developers' workflow on the latest Android APIs.

  • What's novel amongst the Android orbit system

    Influenza A virus subtype H5N1 deep dive into the novel features of the Android orbit system.

  • What's novel amongst ConstraintLayout together with Android Studio pattern tools

    This session covers the novel features inwards ConstraintLayout 2.0, equally good equally the latest functionality added inwards Android Studio pattern tools, highlighting how to effectively accept payoff of them for designing, prototyping, together with edifice a graphical user interface application.

  • Improve app functioning amongst Android Studio Profilers

    This beak demonstrates how to diagnose together with troubleshoot functioning problems amongst your app using Android Studio Profilers. It covers examples of how to usage the CPU, memory, network profilers, together with highlight what's new.

  • Best practices using compilers inwards Android Studio

    This session discusses in-depth what is happening to the diverse compilers used inwards Android: Java 8 linguistic communication characteristic desugaring, the novel dexer (D8) together with shrinker (R8), together with piece of job done on the Kotlin compiler for Android use.

  • Android Jetpack: manage UI navigation amongst Navigation Controller

    This session discusses how to usage the Navigation Editor inwards Android Studio, XML or the Java API to define your navigation graph, together with how that simplifies navigating around your app together with treatment deep linking.

Download & Feedback

Download the latest version of Android Studio 3.2 from the beta channel download page. If you lot are using a previous versions of Android Studio, brand certain you lot update to Android Studio Beta 1 or higher. If you lot also desire to maintain a stable version of Android Studio, you lot tin run the stable release version together with beta release versions of Android Studio at the same time. Learn more.

To usage the mentioned Android Emulator features brand certain you lot are running at to the lowest degree Android Emulator v27.3+ downloaded via the Android Studio SDK Manager.

Please note, to ensure nosotros maintain production quality, some of the features you lot saw inwards the canary channel similar Navigation Editor are non enabled yesteryear default. To plough on canary release channel features give-up the ghost to File → Settings → Experimental → Editor → Enable Navigation Editor.

If you lot abide by a põrnikas or issue, experience gratis to file an issue. Connect amongst us -- the Android Studio evolution squad ‐ on our Google+ page or on Twitter.

Monday, October 8, 2018

Android Emulator - Amd Processor & Hyper-V Support

Posted past times Jamal Eason, Product Manager, Android

Since the major revamp of the Android Emulator 2 years ago, nosotros cause got focused on delivering a fast together with feature-rich emulator to assistance you lot gear upward neat app experiences for users. Today, the Android Emulator is the laissez passer on device deployed to from Android Studio — to a greater extent than than 2x over physical Android devices. We are humbled to listen from many of you lot that the Android Emulator has come upward a long way, simply nosotros are non done yet.

Making the Android Emulator faster is i of the laissez passer on priorities for the Android Studio team. Over the terminal few releases, nosotros cause got launched quick boot & emulator snapshots for apace starting together with resuming emulator sessions inwards nether 2 seconds. Up until now, our emulator experience has close universally worked on macOS® together with Linux computers. But for users of Microsoft® Windows® or the Microsoft® Hyper-V platform, our hardware accelerated speed enhancements for the Android Emulator solely worked alongside computers alongside Intel® processors. Support for AMD® processors together with Microsoft Hyper-V hypervisor are 2 long-standing user requests from the Android developer community that nosotros are happy to address alongside this Android Emulator update.

Today, you lot tin give the sack download the latest Android Emulator release, which is enabled to run x86 based Android Virtual Devices (AVD) on computers that role AMD processors. This exciting update makes the Android Emulator to a greater extent than accessible to a novel laid of Android app developers that were previously express to software emulation, simply tin give the sack similar a shot cause got hardware accelerated performance. Moreover, for those of you lot who role Hyper-V to run your local app backend, the Android Emulator tin give the sack similar a shot also coexist alongside other Hyper-V-backed applications on Windows® 10.

Thanks to a novel Microsoft Windows Hypervisor Platform (WHPX) API together with recent open-source contributions from Microsoft, fifty-fifty to a greater extent than Android app developers tin give the sack cause got payoff of all the speed improvements together with features inwards the Android Emulator.

Android Emulator running on Windows 10 alongside AMD Processor Screenshot Configuration: Asus ROG Strix GL 702ZC, Processor: AMD® Ryzen seven 1700 Processor, Chipset: AMD 5350, Graphics: AMD® Radeon RX580

Support for these technologies was initially available inwards the v27.3.8 Android Emulator canary loose together with today nosotros are releasing this laid of preview features (AMD processor & Hyper-V support) on the stable channel for to a greater extent than feedback. Alongside this update, nosotros cause got added additional speed improvements inwards loading emulator snapshots for those developers using the Intel® Hardware Accelerated Execution Manager (HAXM).

How to use

Linux

If you lot role Linux for Android app development, the Android Emulator volition instruct out along to role the native Kernel-based Virtual Machine (KVM) hypervisor for both Intel together with AMD based computers for a fast together with performant virtualization solution. An update to the v27.3.8 Android Emulator volition offering you lot the novel snapshots UI along alongside improvements to performance, reliability together with resources usage.

macOS

For OS X v10.10 Yosemite together with higher, the Android Emulator uses the built-in Hypervisor.Framework past times default, together with falls dorsum to using the Intel Hardware Accelerated Execution Manager (HAXM) if Hypervisor.Framework fails to initialize (such every bit when running on OS X v10.9 or earlier). Once you lot update to the latest Android Emulator on macOS, you lot volition also cause got access to the novel snapshots UI along alongside nether the hood functioning together with reliability improvements.

Android Emulator - Snapshots Extended Controls

Microsoft Windows

On Intel x86-based computers, the Android Emulator volition instruct out along to role Intel HAXM past times default. Intel HAXM is a mature together with open-sourced hypervisor solution developed past times Intel. Thanks to on-going evolution past times Intel, the fastest emulator functioning on Windows is even together with therefore alongside Intel HAXM. To download the latest Intel HAXM v7.2.0, cheque for updates inwards the Android SDK Manager.

If you lot cause got an AMD processor inwards your estimator you lot ask the next setup requirements to hold upward inwards place:

  • AMD Processor - Recommended: AMD® Ryzen processors
  • Android Studio 3.2 Beta or higher - download via Android Studio Preview page
  • Android Emulator v27.3.8+ - download via Android Studio SDK Manager
  • x86 Android Virtual Device (AVD) - Create AVD
  • Windows 10 alongside Apr 2018 Update
  • Enable via Windows Features: "Windows Hypervisor Platform"

Windows Hypervisor Platform setting inwards Windows 10

If you lot desire to role Hyper-V at the same fourth dimension every bit the Android Emulator on your Intel processor-based computer, you lot volition also ask the same Android Studio together with Android Emulator versions every bit listed above, simply alongside the additional requirements:

  • Enable via Windows Features: "Hyper-V" - Only available for Windows 10 Professional/Education/Enterprise
  • Intel Processor : Intel® Core processor that supports Virtualization Technology (VT-x), Extended Page Tables (EPT), together with Unrestricted Guest (UG) features. Additionally VT-x needs to hold upward enabled inwards the BIOS.

For to a greater extent than setup tips together with troubleshooting details, cheque out the documentation page.

Again, for existing Windows users who cause got an Intel-based processor, the Android Emulator volition instruct out along to role the faster together with recommended Intel HAXM configuration. For those using AMD processors, together with those who role Hyper-V hypervisors, this should hold upward an exciting stride forrad to get-go using the Android Emulator.

Next Steps & Feedback

Download the latest Android Emulator from the Android Studio 3.2 Beta SDK Manager for the latest functioning updates across all supported platforms that you lot are using. We are going to instruct out along to invest inwards functioning improvements for each of the platforms together with nosotros expect forrad to your feedback together with characteristic requests.

If you lot uncovering a põrnikas or issue, experience complimentary to file an issue. Connect alongside us -- the Android Studio evolution squad ‐ on our Google+ page or on Twitter.

Updating Your Games For Modern Android

Posted yesteryear Tom Greenaway, Senior Partner Developer Advocate

Last yr nosotros announced that starting from August 2018 Google Play volition require all new apps in addition to games to target a recent Android API score – laid to API score 26 (Android 8.0 Oreo), or higher. Additionally, this requirement volition extend to updates for existing apps in addition to games starting from Nov 2018.

Every novel Android version introduces changes that convey meaning safety in addition to functioning improvements – in addition to heighten the user sense of Android overall. Updating your games to target the latest API score ensures that your users tin create goodness from these improvements, land notwithstanding allowing your games to run on older Android versions.

Simple side yesteryear side steps:

  • Install the Android 8.0 Oreo SDK (API score 26) via Android Studio yesteryear navigating to (Tools > Android > SDK Manager > Android SDK > SDK Platforms).
  • Update your game to target API score 26 in addition to run into whether your game has whatever incompatibilities or issues as presently equally possible. Update whatever external dependencies equally necessary. Learn to a greater extent than close the incremental changes between versions of Android here.
  • If you lot are using an advertising network, SDK or plugin which is incompatible amongst API score 26, accomplish out to your contacts in addition to discovery out their timeline for supporting target API score 26. The sooner they're aware of these changes the better.
  • If you lot ready your game amongst Unity, back upwardly for target API 26 is built into Unity 5.6.6 in addition to beyond. Simply ensure the latest target API score is selected inward your Android ready settings for Unity (Build Settings > Android > Player Settings). For versions of Unity 5.6.5 in addition to prior, consult this documentation which includes a workaround for versions dating dorsum to 4.3.
  • For games built amongst Unreal, depository fiscal establishment fit your Android platform settings has the "Target SDK Version" laid to 26.
  • If you lot role Cocos2D-X, depository fiscal establishment fit the target API score inward the gradle.properties file that is generated.

Significant changes to travel aware of:

  • Since API 23, nosotros accept required permissions travel requested at runtime which helps streamline the app install process.
  • Since API 24, apps tin no longer dynamically link against non-NDK libraries. If your app (including third-party static libraries) contains native code, you lot should exclusively travel using public NDK APIs.
  • If your game uses Android force notifications, the Google Play Services SDK inward your game volition postulate to travel updated to version 10.2.1 or above for your game to back upwardly API score 26.
  • If your game uses opaque binary blobs (OBB), then your game must depository fiscal establishment fit if it tin access the directory earlier attempting to access the OBB files themselves. We recommend explicitly requesting permission for access using the Runtime Permissions API, in addition to gracefully treatment cases wherein the permission is non granted. Additionally, add together an entry inward the manifest for the external storage access:
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 

Moving ahead

Remember, updating the target API score is only the outset pace – brand certain your game is compatible amongst the deportment changes betwixt your electrical current target API score in addition to API score 26. Check out farther guidance on the changes inward yesteryear versions of Android to assistance inward your migration process. These policy changes are of import for moving the Android ecosystem frontwards in addition to keeping it well for you lot for our users – in addition to yours.

How useful did you lot discovery this weblog post?