[go: up one dir, main page]

Release updates archive


Android Studio 4.1 RC 2 is now available in the Beta channel.

If you have Android Studio set up to receive updates on the Beta channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it here.

For information on new features and changes in all preview builds of Android Studio 4.1, see the Android Studio Preview release notes. For details of bugs fixed in each preview release, see previous entries on this blog.

We greatly appreciate your bug reports, which help us to make Android Studio better. If you encounter a problem, let us know by reporting a bug. Note that you can also vote for an existing issue to indicate that you are also affected by it.

General Fixes

This update includes fixes for the following issues:



Android Gradle Plugin Deployment Dexer (D8)
  • Issue #160905482: Desugaring broken for subclasses of ConcurrentHashMap
  • Issue #160909126: coreLibraryDesugaringEnabled seems to break ConcurrentHashMap when using Gson and reflection
Import/Sync Lint
  • Issue #158128960: AGP 4.0 false positive Instantiatable Lint check if Application extends java class
Run Shrinker (R8)
  • Issue #161403944: With AGP 4.1.0.beta01+, minifyEnabled = true leads to runtime crash due to java.lang.VerifyError
  • Issue #161154276: [2.1.52] Undefined value encountered during compilation. This is typically caused by invalid dex input that uses a register that is not defined on all control-flow paths leading to the use
  • Issue #160942326: Runtime errors when using R8 2.0+
  • Issue #160901582: CompilationError during R8 phase when optimizations enabled
  • Issue #161230424: App crashes after Upgrading to AS 4
  • Issue #162921738: Conditional keep rule not triggered by other keep rule
  • Issue #159194018: Problem with ClassInitializationAnalysis for kotlin coroutines android library
  • Issue #162568140: NullPointer during IR Conversion in R8
  • Issue #161735546: gradle:4.1.0-beta04 Null pointer exception when generating signed build
  • Issue #152476580: Gradle 4.0.0 and above libcore.reflect.AnnotationAccess.toAnnotationInstance exception

Additionally the issues below were addressed in this release but may not be necessarily fixed:

Import/Sync
  • Issue #160909456: androidx compose project gradle sync breaks when upgrading to AS 4.2 Canary 4
Memory
  • Issue #161925082: The Instance View window is too small and cannot be made wider
Motion Editor New Project Wizard Shrinker (R8)
  • Issue #161727616: [R8 2.1.52] java.lang.NoSuchFieldError: No field Companion of type ...

 

Emulator 30.1.1 is now available in the Canary and Dev channels.

General fixes available in this release

  • Removed icebox run command from console
  • Removed the redundant foldable snapshot
  • Upgraded compiler toolchain to clang 11.0.2
  • Vulkan: enforce page alignment host pointers of ColorBuffer
  • Unlock foldable structure when calling UI change.


Android Studio 4.2 Canary 8 is now available in the Canary and Dev channels.

If you have Android Studio set to receive updates on the Canary or Dev channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it here.
For information on new features and changes in all preview builds of Android Studio 4.2, see the Android Studio Preview release notes. For details of bugs fixed in each preview release, see previous entries on this blog.

We greatly appreciate your bug reports, which help us to make Android Studio better. If you encounter a problem, let us know by reporting a bug. Note that you can also vote for an existing issue to indicate that you are also affected by it.

Database Inspector: Offline mode

In Android Studio 4.2 Canary 8 and higher, we've added the ability to keep inspecting your app's databases after a process disconnects, making it easier to debug your app after a crash. While offline, you can open and query tables. However, you cannot edit values or run modification statements until you reconnect to an app process.


To learn more, see the release notes.

General Fixes

This update includes fixes for the following issues:

Android Gradle Plugin C++ Import/Sync Code Analysis
  • Issue #36991569: Lint warning for animation created but not .start()ed
  • Issue #149416536: Request: Lint Warning for AnimatorInflator.loadAnimator on API 23 and below
Data Binding
  • Issue #161814391: Kotlin process annotation is busted starting in 4.2 canary 5
  • Issue #152153710: Referencing a generic LiveData works with AGP <= 3.5.0 but fails for later versions.
Deployment Dexer (D8)
  • Issue #160905482: Desugaring broken for subclasses of ConcurrentHashMap
  • Issue #160909126: coreLibraryDesugaringEnabled seems to break ConcurrentHashMap when using Gson and reflection
Editing Import/Sync Layout Editor
  • Issue #162588517: Some exceptions by custom views are not reported in the issue panel
Lint
  • Issue #158128960: AGP 4.0 false positive Instantiatable Lint check if Application extends java class
  • Issue #67602844: Add Lint rule for unmodifiable SharedPreferences.getStringSet.
  • Issue #161362796: False positives in lint check NonConstantResourceIdDetector
  • Issue #159532832: Android Studio 4.2's lint error UI is confusing
  • Issue #159935420: [Lint feature request]: Errors for using newer patterns in SimpleDateFormat
  • Issue #118332958: Make whole file not translatable for pseudoLocalesEnabled true
  • Issue #139100146: Request: each time we use RemoteViews, don't let code be built till unless all views in the layout are supported
Navigation Editor New Code/Templates Project Structure
  • Issue #162351817: AS treat whenObjectAdded clousere from android.productFlavors as flavour in Project Structure
Resources
  • Issue #160865813: Required attributes are not automatically inserted for FQN view tag
Run Shrinker (R8)
  • Issue #161403944: With AGP 4.1.0.beta01+, minifyEnabled = true leads to runtime crash due to java.lang.VerifyError
  • Issue #160901582: CompilationError during R8 phase when optimizations enabled


Additionally the issues below were addressed in this release but may not be necessarily fixed:

Android Gradle Plugin
  • Issue #162528480: AGP 4.2.0-alpha07 fails with java.lang.IllegalStateException: Failed to pseudo-localize string
  • Issue #161115878: GradlePlugin: Kotlin access to extra properties in ProductFlavor (it should be ExtensionAware)
Android Studio
  • Issue #160271731: Set up integration test to make sure studio can open a compose file without issues
API
  • Issue #69953968: Allow "packagingOptions" to be defined per build type/variant
Code Editor Import/Sync
  • Issue #160909456: androidx compose project gradle sync breaks when upgrading to AS 4.2 Canary 4
Layout Inspector Lint
  • Issue #163080422: lint.xml: synchronize with IDE, allow directory nesting, support configurations, etc
  • Issue #134987035: Use of LintOptions severity overrides breaks OTHER check validations
  • Issue #122769438: [ConstantLocale] Use of Locale.getDefault() within an enum value method is incorrectly flagged as being assigned to a static final constant
  • Issue #161584622: [lint] DiffUtilEquals false positive when type is exactly known
Memory
  • Issue #161925082: The Instance View window is too small and cannot be made wider
Run

ConstraintLayout 2.0.1 is now available on the google maven repository: 


dependencies {
  implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
}


or if using the android.support packages:


dependencies {
  implementation 'com.android.support.constraint:constraint-layout:2.0.1'
}

Documentation & Examples



Bugfixes

This release fixes a compatibility issue with MotionEditor for all version of Studio.

 Emulator 30.1.0 is now available in the Canary and Dev channels.

General fixes available in this release:

# Foldables support


  • Allow using (percentage on screen, width) to replace (x, y, width, height) to config hw.sensor.hinge.area. The old style is still supported.

We are very happy to announce the stable release of ConstraintLayout 2.0 -- a long journey, but this version adds a very long list of capabilities to v1!

From better runtime API to build up layouts, to the introduction of new layout mechanisms such as Flow, or additional helpers like Layer, the new features will help you build powerful and adaptable layouts. Most notably of course, this release introduces MotionLayout, an extremely powerful subclass of ConstraintLayout that you can use to create refined motion in your application.

In addition to the existing Layout Editor in Android Studio, allowing easy creation and edition of UI with ConstraintLayout, we recently added a new Motion Editor in Android Studio 4.0+, enabling you to quickly take advantage of MotionLayout in your projects.


It’s available from the google maven repository:
dependencies {
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
}




or if using the android.support packages:

dependencies {
    implementation 'com.android.support.constraint:constraint-layout:2.0.0'
}



Documentation is available on https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout and https://developer.android.com/reference/androidx/constraintlayout/motion/widget/MotionLayout

Examples are available on https://github.com/android/views-widgets-samples/tree/master/ConstraintLayoutExamples


Note
We are aware of a compatibility issue with Motion Editor in Studio 4.0, a fix will be released shortly. 
Bugfixes

Here is the list of issues fixed since the rc1. Notable fixes are:
  • MotionLayout Transition delays & TransitionListener fixes
  • ConstraintLayout flow & barrier fixes
MotionLayout inside ScrollView does not properly adjust height after transition140447122
A view has 0 width instead of full width when surrounded and constrained with other three gone views162917672
ConstraintLayout : View that has both top and bottom constraints is positioned wrong163880200
ConstraintLayout : incorrect positioning when applying a bias of 1.0165028374
Setting the visibility of a View to GONE causes layout to render incorrectly in 2.0.0-rc1164130218
[Flow] android:layout_width == 0dp works wrong164794521
TransitionListener.onTransitionChange is called over and over again when use MotionLayout in RelativeLayout152542382
Incorrect positioning of Barriers in 2.0.0-beta5159540431
TOP barrier broken in beta8163100583
Long duration fadeIn animation163848906
Negative padding causes issues with 2.0.0-rc1164160877


Emulator 30.0.26 is now available in the Canary and Dev channels.

General fixes available in this release:
  • Fixed FD_SETSIZE error on Windows. We now use WSAEventSelect() instead of select() for establishing non-blocking connections to loopback servers.
  • Added F16C CPUID feature support to Linux emulator; macOS/Windows in progress.
  • If hw.audioInput=no and hw.audioOutput=no in config.ini, emulator audio is now properly disabled.
  • Added support on the host side for virtio-gpu host coherent blob resources.
  • Due to how emulator rendering works, we now process virtio-gpu virtqueue in the vcpu thread (because rendering is offloaded to other threads anyway). virtio-gpu rendering will be enabled in a future system image + emulator version.
  • Fixed an issue where if the emulator window was minimized while the extended controls window was open but not active, the extended controls window would keep showing up when resizing the emulator window. We will completely remove the behavior (the case with active extended controls window) in a future update.


Android Studio 4.1 RC 1 is now available in the Beta channel.

If you have Android Studio set up to receive updates on the Beta channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it here.

For information on new features and changes in all preview builds of Android Studio 4.1, see the Android Studio Preview release notes. For details of bugs fixed in each preview release, see previous entries on this blog.

We greatly appreciate your bug reports, which help us to make Android Studio better. If you encounter a problem, let us know by reporting a bug. Note that you can also vote for an existing issue to indicate that you are also affected by it.

General Fixes



Android Gradle Plugin Deployment Lint

Emulator 30.0.25 is now available in the Canary and Dev channels. 


General fixes available in this release:

  • Fixed a flaky bug with Wi-Fi not connected when the emulator starts.

  • 3D foldable view and hinge parameters are now integrated with the existing foldable presets. The following can be a used with, for instance, the 7.3 foldable AVD's config.ini:

    • hw.sensor.hinge = yes

    • hw.sensor.hinge.count = 1

    • hw.sensor.hinge.type = 1

    • hw.sensor.hinge.ranges = 180-360

    • hw.sensor.hinge.defaults = 180

    • hw.sensor.hinge.areas = 54.7-0

    • hw.sensor.posture_list=4, 3

    • hw.sensor.hinge_angles_posture_definitions=210-360, 180-210 

    • hw.sensor.hinge.fold_to_displayRegion.0.1_at_posture=4

Continuous Testing with Android Emulator Containers

Setting up and running the Android Emulator on continuous integration (CI) or deployment (CD) is now easier than ever before with our pre-built Android Emulator Containers. These containers allow you to find and run the right version of the Emulator without the headache of dependency management, which makes it easy to scale automated tests as part of a CI/CD system without the upkeep cost of a physical device farm.



Earlier this year, we released Android Emulator download and Docker image generator scripts to help developers who were struggling to deploy and debug remote emulators. These scripts made it easier to find the right system image, manage system dependencies, and run the Android Emulator.



We are now taking this one step further and experimentally providing pre-built Android Emulator Containers for each major Emulator release. These containers remove the need to manually run the generator yourself, saving time and complexity. Don’t worry, the pre-built containers still support all of the features offered by those built with the Docker scripts, like adb and web access.



Linux KVM is required to run these containers and can be enabled by running on bare metal or on a virtual machine with nested virtualization. The correct option depends on your cloud provider, so read our documentation for recommendations.


The script below is an illustration of how you can integrate an Android Emulator Container into your system and use it to run tests.

#!/bin/bash

# This is the remote image we are going to run.
# Docker will obtain it for us if needed.
DOCKER_IMAGE=us-docker.pkg.dev/android-emulator-268719/images/r-google-x64:30.0.23

# This is the forwarding port. Higher ports are preferred as to not interfere
# with adb's ability to scan for emulators.
PORT=15555

# This will launch the container in the background.
container_id=$(docker run -d \
  -e "ADBKEY=$(cat ~/.android/adbkey)" --device /dev/kvm --publish \
  8554:8554/tcp --publish $PORT:5555/tcp  \
  $DOCKER_IMAGE)

echo "The container is running with id: $container_id"

# Note you might see something like:
# failed to connect to localhost:15555
# this merely indicates that the container is not yet ready.

echo "Connecting to forwarded adb port."
adb connect localhost:$PORT

# we basically have to wait until `docker ps` shows us as healthy.
# this can take a bit as the emulator needs to boot up!
echo "Waiting until the device is ready"
adb wait-for-device

# The device is now booting, or close to be booted
# We just wait until the sys.boot_completed property is set to 1.
while [ "`adb shell getprop sys.boot_completed | tr -d '\r' `" != "1" ] ;
do
  echo "Still waiting for boot.."
  sleep 1;
done

# Now you can use the emulator as usual for example:
# ./gradlew installDebug
# ./gradlew connectedAndroidTest
# etc..

echo "The device is ready"
echo "Run the following command to stop the container:"
echo "docker stop ${container_id}"


Check out our README for further information on getting started and taking advantage of the Android Emulator Containers. This is our first time offering pre-built Emulator Containers, so please report any problems or feature requests on our issue tracker.

Emulator 30.0.24 is now available in the Canary and Dev channels. 


General fixes available in this release:
  • Fixed an issue with Youtube videos flickering or not showing up on snapshot load.

  • Foldable devices now also carry a sub-type parameter. The config.ini property `hw.sensor.hinge.sub_type = hinge/fold` is now available. More info

  • Hinge sensor is now enabled by default.

  • Fixed a race condition when tearing down Vulkan state when a guest Vulkan app exited.

  • Switched back to software decode for libvpx for now as we've seen issues with CUDA hardware decode of libvpx. If you have a supported CUDA hardware decode implementation on the host side, hardware decode of libvpx can be re-enabled via the environment variable `ANDROID_EMU_MEDIA_DECODER_CUDA_VPX=1`.

  • USB passthrough is now available on Windows via `-qemu -usb -device usb-host,vendorid=<usb-vendor-id>,productid=<usb-product-id>`