Android Studio 3.4 Update: Enhancements and New Features
It’s been three months since my last update, and I’m glad to be back with a fresh perspective on the latest Android Studio 3.4 release. With this update, Google has introduced several exciting features that will make your development experience more efficient and enjoyable. In this article, we’ll delve into the new project structure dialog, the resource manager, ID checks during APK debugging, R8 optimization, and more.
New Project Structure Dialog
The new project structure dialog (PSD) is a game-changer for Android developers. This dialog box makes it easier to update dependencies and configure all aspects of your project, such as module construction, variant configuration, and build variables. To access the PSD, follow these steps:
- Click on File > Project Structure (or use the shortcut Ctrl+Shift+Alt+S on Windows/Linux or Command+; on Mac).
- In the dialog box, click on the left top corner where it says Variables. This will allow you to quickly view and edit the project’s build Gradle build script variables that already exist. You can also add new project or module-level variables from here.
Variable Configuration
The Variables section of the PSD allows you to configure various aspects of your project, including:
- DefaultConfig: Configure the default configuration for your project.
- SigningConfigs: Configure the signing configurations for your project.
- Build Variables: Configure the build variables for your project.
Configuration Modules
The Modules section of the PSD allows you to configure the Android project properties for each module in your project.
Configuration Dependencies
The Dependencies section of the PSD allows you to view and configure the dependent libraries for each module in your project. You can also add new dependencies or search for existing ones.
Variant Constructs
The Variant Constructs section of the PSD allows you to configure the variant constructs for your project, including:
- Session Box: Configure the session box to release package and debug packages of different configurations.
- Flavor: Configure the flavor to build different app versions, such as different packages for channels or free and fee packages.
The New Explorer
The Resource Manager is a new tool window that allows you to import, create, manage, and use resources in your project. To access the Resource Manager, follow these steps:
- Open Windows Explorer.
- Select the menu bar View > Tool Windows > Resource Manager (or use the shortcut Ctrl+Shift+Alt+S on Windows/Linux or Command+; on Mac).
- In the Resource Manager, you can:
- Visual Resources: View resources in a visual format.
- Batch Import: Import resources in bulk.
- Drag and Drop Resources: Drag and drop resources to move them between different resources.
- View Alternate Versions: View alternate versions of resources.
- Tile and List Views: Switch between tile and list views to display resources.
Construction of ID Checks during APK Debugging
When you provide a debugging symbols table for the .so shared libraries in the APK, Android Studio will verify the symbol table provided .so library building ID is constructed within the APK ID matches. If you want to build in the APK ID used to build a local library, Android Studio will check the symbol table whether the building constructed ID ID matches the local library. If no match is found, the symbol table is denied.
R8 Optimization
R8 is integrated in the step desugared (desugaring), compression (shrinking), confused (obfuscating), optimization (Optimizing) and file transfer .dex (dexing), thereby significantly improving the performance of the construction. R8 is a plug-in Android Gradle 3.3.0 introduced, now is the use of plug-in 3.4.0 and later versions of the application and enabled by default Android library project.
To disable R8, you can configure in gradle.properties file:
- # Disables R8 for Android Library modules only
android.enableR8.libraries = false - # Disables R8 for all modules
android.enableR8 = false
Optimize the Layout Editor
The layout editor has been optimized to show the property has been declared in the right side Declared Attributes, and allows you to quickly add and delete attributes. Each property right has a resource reference attribute indicator, if you refer to was solid.
Quickly Import Dependence Intention of Operating the New Library
The intent of the import-dependent library is limited to your use JetPack and Firebase classes, will have prompted a corresponding import libraries.
With these new features and enhancements, Android Studio 3.4 is a significant update that will make your development experience more efficient and enjoyable. I hope this article has provided you with a comprehensive overview of the new features and enhancements in Android Studio 3.4.