The second Android 11 Developer Preview is now available, test it out and share your feedback.

New features in Android Studio Preview

Android Studio 3.6 has been released to the stable channel. Download it here.

Android Studio 4.1 is currently in the Canary and Dev channels, and Android Studio 4.0 is currently in the Beta channel.

For the latest news on releases, including a list of notable fixes in each release, also see the Release updates.

If you encounter any problems using a preview version of Android Studio, please let us know. Your bug reports help to make Android Studio better.

Android Studio 4.1

This section provides a summary of the new features and changes in Android Studio 4.1.

Native Memory Profiler

The Android Studio Memory Profiler now includes a Native Memory Profiler for apps deployed to physical devices running Android 10 or later. With a sample size of 32 bytes, the Native Memory Profiler tracks allocations/deallocations of objects in native code for a specific time period and provides the following information:

  • Allocations: A count of objects allocated via malloc() or the new operator during the selected time period.
  • Deallocations: A count of objects deallocated via free() or the delete operator during the selected time period.
  • Allocations Size: The aggregated size in bytes of all allocations during the selected time period.
  • Deallocations Size: The aggregated size in bytes of all freed memory during the selected time period.
  • Total Count: The value in the Allocations column minus the value in the Deallocations column.
  • Remaining Size: The value in the Allocations Size column minus the value in the Deallocations Size column.

Native Memory Profiler

To initiate a recording, click Record native allocations at the top of the Memory Profiler window:

Record native allocations button

When you're ready to complete the recording, click Stop recording.

Use TensorFlow Lite models

ML Model Binding makes it easy for you to directly import .tflite model files and use them in your projects. Android Studio generates easy-to-use classes so you can run your model with less code and better type safety.

Supported models

The current Canary implementation of ML Model Binding supports image classification models, provided they are enhanced with metadata. Over time, support will be expanded to other problem domains, like style transfer, object detection, image segmentation, and text classification.

A wide range of pre-trained image classification models are provided on TensorFlow Hub – just look for and download the model formats that mention "metadata". You can also add metadata to a TensorFlow Lite model yourself, as is outlined in Adding metadata to TensorFlow Lite model.

Import a model file

To import a supported model file, follow these steps:

  1. Open the TensorFlow Lite model import dialog in the File menu at File > New > Other > TensorFlow Lite Model.
  2. Select the .tflite model file that you previously downloaded or created.
  3. Click Finish.

This imports the model file into your project and places it in the ml/ folder; if the directory doesn't exist, Android Studio will create it for you.

Import a TensorFlow Lite model

Enable ML Model Binding feature

To configure your app to use ML Model Binding you need to add the buildFeatures and aaptOptions elements to your build.gradle file in the app module, as shown in the following example:

android {
  ...
  buildFeatures {
    mlModelBinding true
  }
  aaptOptions {
    noCompress "tflite"
  }
}

Double-click on the TensorFlow Lite model file in your project and click on Add Now in the notification banner at the top. This will add the correct dependencies to the build.config file.

View model metadata

To see the details for an imported model and get instructions on how to use it in your app, double-click the model file in your project to open the model viewer page, which shows the following:

  • Model: High-level description of the model
  • Tensors: Description of input and output tensors
  • Sample code: Example of how to interface with the model in your app

Screenshot of TensorFlow Lite model viewer

If the model does not have metadata, this screen will only provide minimal information.

Use the model in your app

The model viewer provides sample code to help you get started with using the model in your app.

Here is an example using mobilenet_quant_metadata.tflite:

Kotlin

try {
    val model: MobilenetQuantMetadata = MobilenetQuantMetadata.newInstance(this)

    // Creates a TensorImage instance from Bitmap.
    val tensorImage = TensorImage()
    tensorImage.load(bitmap)

    // Runs model inference and gets result.
    val outputs: MobilenetQuantMetadata.Outputs = model.process(tensorImage)
    val tensorLabel: TensorLabel = outputs.getProbabilityAsTensorLabel()
    val probMap = tensorLabel.mapWithFloatValue

    for ((key, value) in probMap) {
        Log.d(TAG, "label = $key, prob = $value")
    }
} catch (e: IOException) {
    // Handles exception
}

Java

try {
    MobilenetQuantMetadata model = MobilenetQuantMetadata.newInstance(this);

    // Creates a TensorImage instance from Bitmap.
    TensorImage tensorImage = new TensorImage();
    tensorImage.load(bitmap);

    // Runs model inference and gets results.
    MobilenetQuantMetadata.Outputs outputs = model.process(tensorImage);
    TensorLabel tensorLabel = outputs.getProbabilityAsTensorLabel();
    Map probMap = tensorLabel.getMapWithFloatValue();

    for (Map.Entry entry : probMap.entrySet()) {
      Log.d(TAG, "label = " + entry.getKey() + ", prob = " + entry.getValue());
    }
} catch (IOException e) {
   // Handles exception
}

As the example demonstrates, Android Studio creates a class called MobilenetQuantMetadata for interacting with the model.

Known issues and workarounds

  • Support for TensorFlow Lite models for problem domains other than image classification is currently limited. Although import should work fine, some model inputs and/or outputs are represented by TensorBuffers rather than friendly types. For models without any metadata, all model inputs and outputs will be TensorBuffers.
  • To support TensorFlow lite models larger than 20 MB, override the following IntelliJ IDE property: idea.max.content.load.filesize. See this page for more details.
  • Models with Input and Output data types different from DataType.UINT8 or DataType.FLOAT32 are not supported.
  • Generated API surface does not yet include nullability annotations.

This feature is still under development, so please provide feedback or report bugs.

Support for Jetpack Compose

Jetpack Compose toolkit provides a modern approach to building your app's UI. The toolkit also brings all of Kotlin's benefits, such as helping you to write concise and idiomatic code that's fully interoperable with Java.

For the best experience developing with Jetpack Compose, you should use the latest version of Android Studio 4.1. That's because when you use Android Studio to develop your app with Jetpack Compose, you can benefit from smart editor features, such as New Project templates and the ability to immediately preview your Compose UI.

To learn more and get started, go to the Jetpack Compose overview.

Assertions in debug builds

Assertions in your Java code are now enabled when deploying the debug version of your app. Because the Android runtime doesn't support enabling assertions at runtime (that is, passing the equivalent of the -ea/-enableassertions flag to a Java VM), assertions in your app previously had no effect.

Now, when you build and deploy the debug version of your app using Android Gradle plugin 4.1.0-alpha01 and higher, the built-in compiler (D8) rewrites the code to enable assertions at compile time, so you always have the assertion checks active.

Known Issues for 4.1 Preview

This section describes current known issues in Android Studio 4.1 Preview.

Patches not working in 4.1 Canary 2

Patches for Android Studio 4.1 Canary 2 are currently broken. To update to a newer version of Android Studio 4.1, shut down Android Studio, then download and install the latest package.

This issue has been fixed in Android Studio 4.1 Canary 3.

Timeout errors in CPU Profiler

You may experience "Recording failed to stop" errors in the Android Studio CPU Profiler when you select the Sample Java Methods or Trace Java Methods configurations. These are often timeout errors, especially if you see the following error message in the idea.log file:

Wait for ART trace file timed out

The timeout errors tend to affect traced methods more than sampled methods and longer recordings more than shorter recordings. As a temporary workaround, it may be helpful to try shorter recordings to see if the error disappears.

If you experience timeout issues with the Profiler, please file a bug that includes the make/model of your device(s) and any relevant entries from idea.log and logcat.

Git version control errors in the IDE

Operations requiring authentication in Git version control are broken in the IDE for Android Studio 4.1 Canary 1.

To fix this issue, upgrade to Android Studio 4.1 Canary 2.

Android Studio 4.0

This section provides a summary of the new features and changes in Android Studio 4.0.

CPU Profiler UI Upgrades

System Trace UI Upgrades

Based on your feedback, the CPU Profiler UI has been overhauled to provide a more intuitive workflow. Notable changes include:

  • CPU recordings are now separated from the main profiler timeline to allow for easier analysis. Recorded data are organized in groups on the left side of the Profiler window. You can move groups up and down to reorganize the list by clicking the options options icon in profiler icon in the top-right corner of the window, or by dragging-and-dropping individual items within a group.
  • For easier side-by-side analysis, you can now view all thread activity in the thread activity timeline (including methods, functions, and events).
  • The tabs for Flame Chart, Top Down, and Bottom Up analyses are now in the righthand column. In the Threads group, threads are automatically expanded for System Trace recordings and collapsed by default for other recording types. Double-click on thread names to expand or collapse them.
  • The System Trace UI, as shown in the screenshot above, is also improved. For example, events are now uniquely colored for easier differentiation.

This feature is still a work in progress, so please continue to provide feedback.

Separate annotation processing feature removed

The ability to separate annotation processing into a dedicated task has been removed. This option was used to maintain incremental Java compilation when non-incremental annotation processors are used in Java-only projects; it was enabled by setting android.enableSeparateAnnotationProcessing to true in the gradle.properties file, which no longer works.

Instead, you should migrate to using incremental annotation processors to improve build performance.

Build Speed window

When using Android Studio 4.0 Canary 3 with Android Gradle plugin 4.0.0-alpha03 and higher, the Build Speed window helps you understand and diagnose issues with your build process, such as disabled optimizations and improperly configured tasks. When using Android Studio 4.0 Canary 3 and higher, and Android Gradle plugin 4.0.0-alpha03 and higher, you can open the Build Speed window as follows:

  1. If you haven't already done so, build your app by selecting Build > Make Project from the menu bar.
  2. Select View > Tool Windows > Build from the menu bar.
  3. In the Build window, open the Build Speed window in one of the following ways:
    • After Android Studio finishes building your project, click the Build Speed tab.
    • After Android Studio finishes building your project, click the link in the right side of the Build Output window.

The Build Speed window organizes possible build issues in a tree on the left. You can inspect and click on each issue to investigate its details in the panel on the right. When Android Studio analyzes your build, it computes the set of tasks that determined the build's duration and provides a visualization to help you understand the impact of each of these tasks. You can also get details on warnings by expanding the Warnings node.

Build speed chart

Which tasks determine build duration?

Gradle determines task execution by task interdependencies, project structure, and CPU load, and executes tasks either sequentially or in parallel. For a given build, the Build Speed window highlights the set of sequentially executed tasks that determined the duration of the current build. Addressing inefficiencies in these highlighted tasks is the best starting point for reducing your overall build time.

Keep in mind, you might see a different set of tasks determining build duration with each build you execute. For example, if you make changes to the build configuration, run a build with a different set of tasks (such as an incremental build), or run a build under different constraints (for example, heavier CPU load), the Build Speed window may highlight a different set of tasks that most impacted that build's duration. Because of this variability, you might want to use the Build Speed window across multiple builds to consistently reduce build duration.

Live Layout Inspector

Debug your layout with an updated Live Layout Inspector that provides complete, real-time insights into your app's UI while it's deployed to a device.

To open a Layout Inspector window, go to View > Tools Windows > Layout Inspector. Along with many of the same features of the existing Layout Inspector, the Live Layout Inspector also includes:

  • Dynamic layout hierarchy: Updates as the views on the device change.

Dynamic layout hierarchy

  • Property values resolution stack: Investigate where a resource property value originates in the source code and navigate to its location by following the hyperlinks in the properties pane.

Property values resolution stack

  • 3D view: See your app's view hierarchy at runtime with advanced 3D visualization. To use this feature, in the Live Layout Inspector window simply click on the Layout and rotate it.

Layout inspector: 3D view

You can use the Live Layout Inspector only when deploying your app to devices running API level 29 or higher. You must also enable the feature by navigating to File > Settings > Experimental, and checking the box next to Enable Live Layout Inspector.

Multi Preview

Multi Preview is a visual tool for simultaneously previewing layouts in different devices and configurations, which can help catch potential issues in your layouts.

You can access this feature by clicking on the Multi Preview tab in the top-right corner of the IDE window:

Multi Preview tab

You can select from two different configuration sets: Pixel devices and project locales. To switch between these configuration sets, select from the dropdown menu at the top of the Multi Preview window:

Multi Preview demonstration

Java 8 library desugaring in D8 and R8

Android Studio now includes support for using a number of Java 8 language APIs without requiring a minimum API level for your app.

Through a process called desugaring, the DEX compiler, D8, in Android Studio 3.0 and higher already provided substantial support for Java 8 language features (such as lambda expressions, default interface methods, try with resources, and more). In Android Studio 4.0, the desugaring engine has been extended to be able to desugar Java language APIs. This means that you can now include standard language APIs that were available only in recent Android releases (such as java.util.streams) in apps that support older versions of Android.

The following set of APIs is supported in this release:

  • Sequential streams (java.util.stream)
  • A subset of java.time
  • java.util.function
  • Recent additions to java.util.{Map,Collection,Comparator}
  • Optionals (java.util.Optional, java.util.OptionalInt and java.util.OptionalDouble) and some other new classes useful with the above APIs
  • Some additions to java.util.concurrent.atomic (new methods on AtomicInteger, AtomicLong and AtomicReference)
  • ConcurrentHashMap (with bug fixes for Android 5.0)

To support these language APIs, D8 compiles a separate library DEX file that contains an implementation of the missing APIs and includes it in your app. The desugaring process rewrites your app's code to instead use this library at runtime.

To enable support for these language APIs, include the following in your module's build.gradle file:

android {
  defaultConfig {
    // Required when setting minSdkVersion to 20 or lower
    multiDexEnabled true
  }

  compileOptions {
    // Flag to enable support for the new language APIs
    coreLibraryDesugaringEnabled true
    // Sets Java compatibility to Java 8
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

dependencies {
  coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.5'
}

Let us know if you run into issues or if there are other APIs you want supported by filing bugs bugs on our bug tracker.

Support for Kotlin DSL script files

The Android Gradle plugin now supports Kotlin DSL build script files (*.kts). When used with Android Studio, certain IDE features, such as the Project Structure dialog and build script quick fixes, now also support reading and writing to Kotlin build script files.

Smart editor features for ProGuard rules

Android Studio now provides smart editor features when you open ProGuard rules files, such as syntax highlighting, code completion, and error checking. The editor also integrates with your Android Studio project to provide full symbol completion for all classes, methods, and fields, and includes quick navigation and refactoring.

Smart editor features when editing ProGuard rules files

New Motion Editor

Android Studio now includes a visual design editor for the MotionLayout layout type, making it easier to create and preview animations.

The Motion Editor provides a simple interface for manipulating elements from the MotionLayout library that serves as the foundation for animation in Android apps. In previous releases, creating and altering these elements required manually editing constraints in XML resource files. Now, the Motion Editor can generate this XML for you, with support for start and end states, keyframes, transitions, and timelines.

To get started with the Motion Editor:

  1. Create a ConstraintLayout.
  2. Right-click on the preview in the Layout Editor.
  3. Click Convert to MotionLayout, as shown below.

After Android Studio converts your ConstraintLayout to MotionLayout, a Motion Scene file is also added to the directory containing your XML.

The MotionLayout then becomes your root layout, and it appears in the Motion Editor UI. The layout already includes a start ConstraintSet, end ConstraintSet, and a transition going from start to end.

You can use the overview graphic to select a ConstraintSet or Transition and to select components on the selection panel.

Then you can edit the constraints and attributes of either the start or end ConstraintSet the same way you would edit a ConstraintLayout.

If you want to build more elements to your graph, you can use the creation icons to quickly add a ConstraintSet, Transition, or OnClick/OnSwipe gestures.

To add a keyframe, first click on the Transition arrow:

Then, in the Transition timeline pane, click on the top-right corner and select KeyPosition:

This action opens a dialog where you can set attributes for the keyframe.

You can also add OnClick and OnSwipe handlers to the Transition in the attribute panel.

This action opens a dialog where you can set attributes of the click such as target components and drag direction.

The Motion Editor supports previewing animations on the design surface. When an animation is selected, click Play above the timeline to preview the animation.

New in Android Gradle plugin 4.0.0

This section describes new features and behavior changes included in Android Gradle plugin 4.0.0.

New options to enable or disable build features

Android Gradle plugin 4.0.0-alpha05 introduces a new way to control which build features you want to enable and disable, such as View Binding, Data Binding, and Jetpack Compose. When new features are added, they will be disabled, by default. You can then use the buildFeatures block to enable only the features you want, and it helps you optimize the build performance for your project. You can set the options for each module in the module-level build.gradle file, as follows:

android {
    // The default value for each feature is shown below. You can change the value to
    // override the default behavior.
    buildFeatures {
        // Determines whether to generate a BuildConfig class.
        buildConfig = true
        // Determines whether to support View Binding.
        // Note that the viewBinding.enabled property is now deprecated.
        viewBinding = false
        // Determines whether to support Data Binding.
        // Note that the dataBinding.enabled property is now deprecated.
        dataBinding = false
        // Determines whether to generate binder classes for your AIDL files.
        aidl = true
        // Determines whether to support RenderScript.
        renderScript = true
        // Determines whether to support injecting custom variables into the module's R class.
        resValues = true
        // Determines whether to support shader AOT compilation.
        shaders = true
    }
}

You can also specify the default setting for these features across all modules in a project by including one or more of the following in your project's gradle.properties file, as shown below. Keep in mind, you can still use the buildFeatures block in the module-level build.gradle file to override these project-wide default settings.

android.defaults.buildfeatures.buildconfig=true
android.defaults.buildfeatures.aidl=true
android.defaults.buildfeatures.renderscript=true
android.defaults.buildfeatures.resvalues=true
android.defaults.buildfeatures.shaders=true

Feature-on-feature dependencies

In previous versions of the Android Gradle plugin, all Dynamic Feature modules could depend only on the app's base module. When using Android Gradle plugin 4.0.0, you can now include a feature module that depends on another feature module. That is, a :video feature can depend on the :camera feature, which depends on the base module, as shown in the figure below.

Feature on feature dependencies

Dynamic feature :video depends on feature :camera, which depends on the base :app module.

This means that when your app requests to download a dynamic feature module, the app also downloads other feature modules it depends on. After you create dynamic feature modules for your app, you can declare a feature-on-feature dependency in the module's build.gradle file. For example, the :video module declares a dependency on :camera as follows:

// In the build.gradle file of the ':video' module.
dependencies {
    // All dynamic feature modules must declare a dependency
    // on the base module.
    implementation project(':app')
    // Declares that this module also depends on the 'camera'
    // dynamic feature module.
    implementation project(':camera')
    ...
}

Additionally, you should enable the feature-on-feature dependency feature in Android Studio (to support the feature when editing the Run configuration, for example) by clicking Help > Edit Custom VM Options from the menu bar and including the following:

-Drundebug.feature.on.feature=true

'feature' and 'instantapp' Android Gradle plugins removed

Android Gradle plugin 3.6.0 deprecated the Feature plugin (com.android.feature) and the Instant App plugin (com.android.instantapp) in favor of using the Dynamic Feature plugin (com.android.dynamic-feature) to build and package your instant apps using Android App Bundles.

In Android Gradle plugin 4.0.0-alpha01 and higher, these deprecated plugins are fully removed. So, to use the latest Android Gradle plugin, you need to migrate your instant app to support Android App Bundles. By migrating your instant apps, you can leverage the benefits of app bundles and simplify your app's modular design.

Dependencies metadata

When building your app using Android Gradle plugin 4.0.0-beta02 and higher, the plugin includes metadata that describes the dependencies that are compiled into your app. When uploading your app, the Play Console inspects this metadata to provide you with the following benefits:

  • Get alerts for known issues with SDKs and dependencies your app uses
  • Receive actionable feedback to resolve those issues

The data is compressed, encrypted by a Google Play signing key, and stored in the signing block of your release app. However, you can inspect the metadata yourself in the local intermediate build files in the following directory: <project>/<module>/build/outputs/sdk-dependencies/release/sdkDependency.txt.

If you'd rather not share this information, you can opt-out by including the following in your module's build.gradle file:

android {
    dependenciesInfo {
        // Disables dependency metadata when building APKs.
        includeInApk = false
        // Disables dependency metadata when building Android App Bundles.
        includeInBundle = false
    }
}

Kotlin Android live templates

Android Studio now includes Android live templates for your Kotlin classes. For example, you can now type toast and press the Tab key to quickly insert a Toast. For a full list of available live templates, click File > Settings from the menu bar (or Android Studio > Preferences on macOS) and navigate to Editor > Live Templates.

Fragment wizard and new fragment templates

A New Android Fragment wizard and new fragment templates are now available when you navigate to File > New > Fragment > Gallery or click Create new destination in the Navigation editor.

The Fragment gallery wizard.

The Fragment gallery wizard.

Import native libraries from AAR dependencies

Starting with Android Gradle Plugin 4.0 Canary 9, you can import C/C++ libraries from your app's AAR dependencies. When you follow the configuration steps described below, Gradle automatically makes these native libraries available to use with your external native build system, such as CMake. Note that Gradle only makes these libraries available to your build; you must still configure your build scripts to use them.

Libraries are exported using the Prefab package format.

Each dependency can expose at most one Prefab package, which comprises one or more modules. A Prefab module is a single library, which could be either a shared, static, or header only library.

Typically, the package name matches the Maven artifact name and the module name matches the library name, but this is not always true. Because you need to know the package and module name of the libraries, you might need to consult the dependency's documentation to determine what those names are.

Configure your external native build system

To see the steps you need to follow, click on the external native build system you plan to use.

Native dependencies included in an AAR are exposed to your CMake project via CMAKE_FIND_ROOT_PATH. This value will be set automatically by Gradle when CMake is invoked, so if your build modifies this variable be sure to append rather than assign to it.

Each dependency exposes a config-file package to your CMake build, which you import with the find_package command. This command searches for config-file packages matching the given package name and version and exposes the targets it defines to be used in your build. For example, if your application defines libapp.so and it uses curl, you should include the following in your CMakeLists.txt file:

add_library(app SHARED app.cpp)

# Add these two lines.
find_package(curl REQUIRED CONFIG)
target_link_libraries(app curl::curl)

You can now specify #include "curl/curl.h" in app.cpp. When you build your project, your external native build system automatically links libapp.so against libcurl.so and packages libcurl.so in the APK or app bundle.

Known Issues for 4.0 Preview

This section describes current known issues in Android Studio 4.0 Preview.

Timeout Errors in CPU Profiler

You may experience "Recording failed to stop" errors in the Android Studio CPU Profiler when you select the Sample Java Methods or Trace Java Methods configurations. These are often timeout errors, especially if you see the following error message in the idea.log file:

Wait for ART trace file timed out

The timeout errors tend to affect traced methods more than sampled methods and longer recordings more than shorter recordings. As a temporary workaround, it may be helpful to try shorter recordings to see if the error disappears.

If you experience timeout issues with the Profiler, please file a bug that includes the make/model of your device(s) and any relevant entries from idea.log and logcat.

Patches not working in 4.0 Beta 2

Patches for Android Studio 4.0 Beta 2 are currently broken. To update to a newer version of Android Studio 4.0, shut down Android Studio, then download and install the latest package.

This issue is fixed in Android Studio 4.0 Beta 3.

Git version control errors in the IDE

Operations requiring authentication in Git version control are broken in the IDE for Android Studio 4.0 Beta 1.

To fix this issue, upgrade to Android Studio 4.0 Beta 2 or higher.

Missing Run, Debug, and Profile toolbar buttons

If you have customized the Run/Debug group of action buttons—for example, by modifying options under Appearance & Behavior > Menus and Toolbars in the Settings or Preferences window—those action buttons might disappear from the toolbar after you restart the IDE. This is a known issue in the version of IntelliJ that Android Studio 4.0 is built on (see issue IDEA-228450).

To resolve this issue, revert any customizations you have made to those buttons as follows:

  1. Select File > Settings (or Android Studio > Preferences on macOS).
  2. On the left of the window, navigate to Appearance & Behavior > Menus and Toolbars.
  3. On the right side of the window, navigate to Main Toolbar > Toolbar Run Actions and select Run/Debug.
  4. Near the top of the window, click Revert. and select Restore Run/Debug.
  5. Click OK. You should now see the missing buttons in the toolbar.

Patches Not Available for Canary 5

No patches for Android Studio 4.0 Canary 5 are available for previously released Android Studio 4.0 Canary versions. To install Android Studio 4.0 Canary 5, please download it from the Android Studio downloads page.

Profilers and Live Layout Inspector in Canary 5

Starting with Android Studio 4.0 Canary 5, the Live Layout Inspector and the Profilers do not function correctly on Windows, causing the following error message:

transfer error: couldn't create file: Read-only file system.

To fix this issue, upgrade to Android Studio 4.0 Canary 7 or higher.

Missing Kotlin Maven repo

If you are using Android Studio 4.0 Canary 4 or lower, you might see the following error message:

Application build has failed with an error (Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25)

To resolve this issue, update to Android Studio 4.0 Canary 5 or higher.

IllegalStateException when deploying app with native dependencies

If your app includes native dependencies and has androidParallelJsonGen=true (the default), you will encounter an IllegalStateException exception when you deploy your app from Android Studio. To work around this issue, set android.enableParallelJsonGen=false in your project's gradle.properties file. See Issue 149575364 for more details.

Issues including native dependencies

The Android Gradle plugin currently defaults to an older version of Prefab with a couple known issues:

  • Paths to libraries are incorrectly escaped on Windows.
  • The CMake plugin exports static libraries incorrectly.
  • Valid STL combinations may be incorrectly rejected.

The latest version of Prefab has fixes for these issues. To use the latest version of Prefab, set android.prefabVersion to 1.0.0-alpha6 or higher in your project's gradle.properties file.