Android Studio 2022.2.1.18

Android Studio is the official IDE for Android development, and includes everything you need to build Android apps.

Mục lục bài viết

Features

Visual layout editor

Create complex layouts with ConstraintLayout by adding constraints from each view to other views and guidelines. Then preview your layout on any screen size by selecting one of various device configurations or by simply resizing the preview window.

APK Analyzer

Find opportunities to reduce your Android app size by inspecting the contents of your app APK file, even if it wasn’t built with Android Studio. Inspect the manifest file, resources, and DEX files. Compare two APKs to see how your app size changed between app versions.

Instant Run

Push code and resource changes to your app running on a device or emulator and see the changes instantly come to life. Instant Run dramatically speeds up your edit, build, and run cycles, keeping you “in the flow.”

Intelligent code editor

Write better code, work faster, and be more productive with an intelligent code editor that provides code completion for Kotlin, Java, and C/C++ languages.

Fast emulator

Install and run your apps faster than with a physical device and simulate different configurations and features, including ARCore, Google’s platform for building augmented reality experiences.

Flexible build system

Powered by Gradle, Android Studio’s build system allows you to customize your build to generate multiple build variants for different devices from a single project.

Realtime profilers

The built-in profiling tools provide realtime statistics for your app’s CPU, memory, and network activity. Identify performance bottlenecks by recording method traces, inspecting the heap and allocations, and see incoming and outgoing network payloads.

Note: the newest versions of Android Studio do not offer a Window 32-bit version. Android Studio 3.6.3 was the last to offer a Windows 32-bit version. You can download it here.

What’s New

Complete release notes can be found here.

Android Studio Flamingo | 2022.2.1

Android Studio is the official IDE for Android development, and includes everything you need to build Android apps.

This page lists new features and improvements in the latest version in the stable channel, Android Studio Electric Eel. You can download it here or update to it inside Android Studio by clicking Help > Check for updates (Android Studio > Check for updates on macOS)

To view the release notes for older versions of Android Studio, see Past releases.

The following are new features in Android Studio Electric Eel.

SDK insights

View dependency insights from the new Google Play SDK Index, a public portal with information about popular dependencies, or SDKs. If a specific version of a library has been marked as outdated by its author, a corresponding Lint warning appears when viewing that dependency definition. This enables you to discover and update dependency issues during development instead of later when you go to publish your app on the Play Console. You can learn more about this new tool on the Android Developer’s Blog post here.

App Quality Insights from Firebase Crashlytics

Starting with Android Studio Electric Eel, you can see and act on app crash data from Firebase Crashlytics directly in the IDE. This integration pulls stack trace data and crash statistics from Crashlytics into the new App Quality Insights tool window in the IDE, so you don’t have to jump back and forth between your browser and the IDE. Development teams can benefit from key capabilities including the following:

  • See lines in your code highlighted when they have related Crashlytics event data.
  • See the stack trace for top crashes and click on the stack trace to jump to the relevant lines in your code.
  • See summary statistics about top crash and non-fatal events, for example grouped by device manufacturer and Android version.
  • Filter events by severity, time, and app version.
  • Get a browser link that opens the Crashlytics dashboard page with more details about the event.

With the Android Studio and Crashlytics integration, you can write code and address top crash issues all in the same spot. This enriched development experience helps you stay informed about your app’s performance and minimize disruptions for your users. If you encounter any issues with this feature, file a bug.

If you’re not using Crashlytics yet and would like to learn more about its offerings, see Firebase Crashlytics.

To see Crashlytics data in Android Studio, you need to set up Firebase and Crashlytics in your app project. Here’s how: open the Firebase Assistant in Android Studio by going to Tools > Firebase, click Crashlytics, and then follow the tutorial to add Firebase and Crashlytics to your project. You can read more about the Firebase Assistant workflow in Firebase’s getting started guide for Android.

If you’ve already added Firebase and Crashlytics to your app, sign in to your Developer account in the IDE by clicking on the avatar icon . After you sign in, click on the App Quality Insights tool window. You should see the Issues, Sample Stack Trace, and Details panels populate with reports from Crashlytics.

Navigate Crashlytics data in Android Studio

The App Quality Insights tool window has rich data that gives you insight into the events your users are encountering, and links to help you quickly navigate to the sources of those events.

If your project includes multiple app modules, make sure the module you want to see event data for is selected from the module dropdown menu.

Use the application ID dropdown menu to select the app ID you want to analyze. For example, while you might work on the debug version of your app in the IDE, you might want to see event data for your production version of your app that your users install.

The Issues panel shows the top events that Crashlytics has data for, and is sorted by your most impactful crashes.

The Sample Stack Trace panel shows details about the latest occurrence of the event you click on in the Issues panel. You can see the event’s stack trace and click on the stack trace to jump to the relevant lines in your code base.

There is also information about the device type affected, its Android version, and the time the event occurred, as well a link to the event in the Firebase Crashlytics dashboard. The dashboard is useful if you want to dive deeper and inspect additional stack traces, trends, and custom logs.

The Details panel breaks down the crash counts by device type and Android version, so you can determine which user groups are most affected. It also shows which app version(s) experienced the crash and the number of users affected.

Use the severity filters to select or deselect events that are Fatal or Non-Fatal .

Use the time range and app version filters to hone in on certain subsets of events.

In addition to being able to navigate from stack trace to code, you can also jump from code to stack trace: Android Studio now highlights lines of code that are related to crashes so you can easily spot and debug them.

When you hover over a highlighted line of code, a pop-up appears that shows the event involved, its frequency, and the number of devices affected. You can click on Open in App Quality Insights to jump to the event details in the App Quality Insights tool window. To learn more, See Analyze issues from Firebase Crashlytics with App Quality Insights.

Resizable emulator

You can now test your app on multiple screen sizes and with a single resizable emulator. Testing on a single resizable emulator not only allows you to rapidly test changes across different interfaces, but also promotes a smoother development experience by saving the compute resources and memory that would be required to maintain separate virtual devices.

To use the resizable emulator, you need Android Emulator version 31.1.3 or higher. To upgrade versions, go to Tools > SDK Manager. To create a resizable Android Virtual Device (AVD), follow these steps:

  • In the create device flow, select the Resizable (Experimental) phone hardware profile.
  • Download the Android Tiramisu system image.
  • Follow the prompts to create the AVD.

When you deploy your app to the resizable emulator, use the Display Mode dropdown in the emulator toolbar to quickly toggle between a set of common device types. The emulator screen resizes so you can easily test your app across a range of screen sizes and densities.

Xổ số miền Bắc