[go: nahoru, domu]

Release updates archive





We are happy to announce the release of ConstraintLayout 2.1.0 alpha 2, with many new features :)

dependencies {
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0-alpha2'
}


What's new in 2.1.0 alpha 2More information about the new features in 2.1.0 can be found on the wiki, the source code is available on https://github.com/androidx/constraintlayout
ConstraintLayout


  • android:layout_width and android:layout_height are now optional, with wrap_content as default behavior
  • new layout_constraintWidth and layout_constraintHeight attributes for expressing dimension constraints
  • supports negative margins for constraints
  • supports baseline to top and baseline to bottom constraints
  • supports baseline margin constraints
  • SharedValues allow to inject external values into ConstraintLayout

MotionLayout

  • Support for overshoot interpolators (anticipate, overshoot)
  • Enhanced MotionHelper support
  • Add animated update of ConstraintSet to MotionLayout updateStateAnimate(id,cset,duration);
  • Shared value based ViewTransition
  • scheduleTransitonTo allow you to que a transition to run at the completion of the current transition.

Helpers
  • Carousel now supports an infinite (wrap-around) mode
  • ReactiveGuide : A guideline that position itself automatically when a SharedValue changes
  • MotionEffect : inject Keyframes to referenced views moving in a given direction
  • MotionLabel - A View for animating single line text

Changes

ConstraintLayout.LayoutParams now inherits directly from ViewGroup.LayoutParams, not ViewGroup.MarginLayoutParams.

Fixes
  • vertical ratio incorrectly resolved
  • percent dimension with max dimensions


Android Studio Arctic Fox Canary 3 (2020.3.1.3) 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 Arctic Fox, 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.

Android Gradle plugin: Dependency configurations removed

In AGP 7.0 Canary 3, the following configurations (or dependency scopes) have been removed:

  • compile
    Depending on use case, this has been replaced by api or implementation.
    Also applies to *Compile variants, for example: debugCompile.
  • provided
    This has been replaced by compileOnly.
    Also applies to *Provided variants, for example: releaseProvided.
  • apk
    This has been replaced by runtimeOnly.
  • publish
    This has been replaced by runtimeOnly.

In most cases, the AGP Upgrade Assistant will automatically migrate your project to the new configurations.

General Fixes

This update includes fixes for the following issues:

C++ Debugger
  • Issue #171300775: Display actionable error for missing dependencies: LLDBFrontend exited with code 127
Lint New Project Wizard
Run
  • Issue #174783087: Running application on API30+ device occasionally fail to update the application


Android Studio 4.2 Beta 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.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.

General Fixes


Lint Shrinker (R8)
  • Issue #172999904: R8 Slowdown and Timeout Due to number of proguard rules
  • Issue #173184123: Public tracking bug for b/172895918 - R8 crashing with java.lang.NullPointerException
  • Issue #173598082: R8 build failure: Invalid descriptor char 'N'
Layout Editor Navigation Editor
  • Issue #172694913: AS 4.2 performs incorrect case mapping for camelCase graph IDs when referencing Directions classes
Code Editor New Code/Templates Android Gradle Plugin Emulator
  • Issue #170657960: Embedded emulator on Windows never closes the emulator process

We've made a rough initial preview of the emulator running on Apple Silicon available here. It also contains an AOSP system image build for ARM64. This should enable developers to test/run ARM64 apps via ARM64 hardware virtualization.

https://github.com/741g/android-emulator-m1-preview/releases/tag/0.1

This is a preview of some basic Android emulation functionality on the M1. There are still many issues, but apps work at a basic level. To be updated soon with more fixes. The release tag 0.1 corresponds to this commit: https://android.googlesource.com/platform/external/qemu/+/aca144a9e9264b11c2d729096af90d695d01455d


Known issues
  • Webview doesn't work
  • No sound
  • No device skins
  • Video codecs not working
  • 32 bit ARM apps won't work
  • Graphical glitches in some Vulkan apps
  • Popup on startup about not being able to find the ADB path (ADB will still notice the emulator if you have it installed though)
  • When building, it may be faster to start then cancel the Python triggered build and then reissue ninja -C objs install/strip versus letting the Python triggered build finish.
How to use

This only works on M1 Apple Silicon Macs.

(Note: This has recently been updated with a library path fix to address a failure to start) Go to the Github releases page, download a .dmg, drag to the Applications folder, and run. You'll first need to right click the app icon and select Open and then skip past the developer identity verification step (we are working on providing official identity info). The first few times it starts up it will take a while to show up, but subsequent launches will be faster.

If you've installed Android Studio and Android SDK and adb is available, the emulator should be visible from Studio and work (deploy built apps, debug apps, etc).

How to configure

Edit /Applications/Android\ Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/config.ini. Some notable options:
  • disk.dataPartition.size: size of userdata. When reconfiguring, you'll also need to delete all userdata*.img files in that directory.
  • fastboot.forceColdBoot,fastboot.forceFastBoot: whether to enable snapshots. Current default is snapshots disabled. Set fastboot.forceColdBoot=no,fastboot.forceFastBoot=yes to enable snapshots.
  • hw.lcd.density: Virtual display DPI.
  • hw.lcd.width,hw.lcd.height: Virtual display dimensions.
  • hw.ramSize: RAM limit for the guest. (2GB minimum)

How to wipe data

Remove all userdata*.img files in /Applications/Android\ Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/.

How to build your own emulator

Building the engine

The emulator source code lives (here), but there are a bunch of other dependencies to download, so we use repo.

To build, first make sure you have Xcode and Xcode command line tools installed, and that you have Chromium depot_tools in your PATH (link). Then:

mkdir emu
cd emu
repo init -u https://android.googlesource.com/platform/external/qemu --depth=1
repo sync -qcj 4
cd external/qemu
python android/build/python/cmake.py --target=darwin_aarch64

Note that canceling the python based build after it gets going and issuing just ninja -C objs install/strip may be faster.

The built artifacts are in /path/to/external/qemu/objs/distribution/emulator. They should be automatically signed. However, the binaries in objs/ are not; to sign them, issue ./sign-objs-binaries.sh. Note that this can only be done after ninja -C objs install/strip is successful.

Building the system image

The system image is built from AOSP master sdk_phone_arm64 with a few modifications. Ideally, let's be on a Linux host when building the system image---the build is relatively untested on M1 systems, and at least, we need to create a separate case sensitive partition for the AOSP repo. Assuming you're on Linux:

mkdir aosp-master
cd aosp-master
repo init -u https://android.googlesource.com/platform/manifest -b master --depth=1
repo sync -qcj 4

We first need to make an edit to remove all 32 bit support. Patch this change: link to build/make/target/board/emulator_arm64/BoardConfig.mk. Then:

source build/envsetup.sh
lunch sdk_phone_arm64-userdebug
make -j12 # Or however many CPU cores you have

After that's done, we can use this script to package up the system image for use in /Applications/Android\ Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/.

Assuming you're still in the Android build environment, the script is as follows. It takes one argument, the name of the zip file.

echo $ANDROID_PRODUCT_OUT
export ZIPPED_NAME=$1
mkdir -p $ZIPPED_NAME/files
cd $ZIPPED_NAME/files
cp $ANDROID_PRODUCT_OUT/system-qemu.img system.img
cp $ANDROID_PRODUCT_OUT/vendor.img vendor.img
cp $ANDROID_PRODUCT_OUT/ramdisk.img ramdisk.img
cp $ANDROID_PRODUCT_OUT/ramdisk.img ramdisk.img
if [ -f $ANDROID_PRODUCT_OUT/kernel-ranchu-64 ]; then
  cp $ANDROID_PRODUCT_OUT/kernel-ranchu-64 kernel-ranchu-64
else
  cp $ANDROID_PRODUCT_OUT/kernel-ranchu kernel-ranchu
fi;
cp -r $ANDROID_PRODUCT_OUT/data .
cp -r $ANDROID_PRODUCT_OUT/advancedFeatures.ini advancedFeatures.ini
cp -r $ANDROID_PRODUCT_OUT/userdata.img .
cp -r $ANDROID_PRODUCT_OUT/encryptionkey.img .
cp -r $ANDROID_PRODUCT_OUT/build.prop .
mkdir system
cp -r $ANDROID_PRODUCT_OUT/build.prop system/build.prop
cp -r $ANDROID_PRODUCT_OUT/VerifiedBootParams.textproto .
cp -r $ANDROID_PRODUCT_OUT/source.properties .
cd ..
zip -1rq $ZIPPED_NAME.zip files
ls -l $ZIPPED_NAME.zip

Then, $ZIPPED_NAME.zip can be sent over to the M1 and the contents of its files/ can be coped over into /Applications/Android\ Emulator.app/Contents/MacOS/aosp-master-arm64-v8a/. Make sure to remove all userdata*.img files after doing this though.


Android Studio Arctic Fox Canary 2 (2020.3.1.2) 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 Arctic Fox, 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.

Android Studio now uses Gradle test runner

To improve overall consistency of test executions, Android Studio now uses Gradle to run all unit tests by default.

In many cases, this change will not affect your testing workflow in the IDE. However, if you're using custom Android JUnit run configurations, you will need to migrate these configurations to Gradle run configurations.

To learn more, see the release notes.

Known issue: Update patches not working for Canary 2

On Linux and macOS machines, update patches are not working for Canary 2. To upgrade to the Canary 2 release, download and install the full version.

General Fixes

This update includes fixes for the following issues:

Android App Bundles
  • Issue #111082605: Root binary files are packaged with base.apk instead of feature.apk
Android Gradle Plugin
  • Issue #173770818: Having tests only under `androidTest/kotlin` will not run any integration tests
Code Editor Import/Sync Jetpack Compose Layout Editor Layout Inspector Lint
  • Issue #172055763: Lint: OOM while analyzing Kotlin list of lambdas with receivers
  • Issue #173825213: lint.xml <ignore> paths not treated as relative to the lint.xml file
New Code/Templates


Android Studio 4.2 Beta 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.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.

General Fixes


Android Gradle Plugin
  • Issue #171364505: Shrinking library with multidex enabled fails (after 4.0 -> 4.1 update)
  • Issue #172055303: Disabling android resources in libraries breaks unit tests
C++ Build
  • Issue #171300770: NullPointerException in CmakeServerExternalNativeJsonGenerator when refreshing linked C++ projects
Lint Release Bundle/APKs
  • Issue #157584987: Android Gradle Plugin 3.6.x resulting larger .aab on debug build compared to AGP 3.5.x


Android Studio Arctic Fox Canary 1 (2020.3.1.1) 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 Arctic Fox, 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.

Updated version numbering for Android Studio

We have changed the version numbering system for Android Studio to more closely align with IntelliJ IDEA, the IDE upon which Android Studio is built. For more information, see the release notes.

Updated version numbering for Android Gradle plugin

We are updating the version numbering for Android Gradle plugin (AGP) to more closely match the underlying Gradle build tool. Therefore, AGP 7.0 will be the next release after AGP 4.2. For more details, see Versioning changes in the AGP release notes.

General Fixes

This update includes fixes for the following issues:

Activity
  • Issue #170026127: ActivityResultFragmentVersionDetector lint failure when using 1.2.0-beta01 with fragment 1.3.0-beta01
Android Gradle Plugin Android Studio
  • Issue #169776728: Incorrect imports when using Jetpack Compose default live templates
  • Issue #80166964: IntDef annotation for variable not working anymore
AVD Manager
  • Issue #159878401: "Cold Boot Now" on AVD Manager does not really cold boot emulator
Build Output C++
  • Issue #169442540: Include header directories in project
  • Issue #168806413: Adobe Listening Session: In APK debugging, single import directory for all .so files
C++ Build
  • Issue #159434435: Android Gradle Plugin 4.0: CMake argument starting from '-C' is not passed to cmake executable, rendering build broken
  • Issue #171300770: NullPointerException in CmakeServerExternalNativeJsonGenerator when refreshing linked C++ projects
C++ Debugger
  • Issue #168647695: Remove rerun button from the native debug panel
  • Issue #37121046: Debugger type selection ignored/broken until I click "edit configurations"
Code Editor CPU Emulator
  • Issue #162564820: "Enter" key doesn't work in Emulator tool window
  • Issue #155221674: Embedded Emulator: Feature request for device frame on/off
  • Issue #170657960: Embedded emulator on Windows never closes the emulator process
  • Issue #162573673: Android Emulator in same window as studio does support drag and install of APK on emulator
Import/Sync Layout Editor
  • Issue #139242310: Creating a layout file with specific qualifiers fails if a directory already exists with the same qualifiers
  • Issue #173198421: Request to insert missing font sizes into textview
Lint Navigation Editor
  • Issue #170059094: Unresolved reference for NavArgs declared at top of (nested) NavGraph
  • Issue #164163197: Navigation destination search not working for "e", "r" and "o" letters
  • Issue #172694913: AS 4.2 performs incorrect case mapping for camelCase graph IDs when referencing Directions classes
New Code/Templates Release Bundle/APKs
  • Issue #157584987: Android Gradle Plugin 3.6.x resulting larger .aab on debug build compared to AGP 3.5.x
Resource Manager Run
  • Issue #167977589: Run button disabled while Gradle sync is invalidated
  • Issue #170709330: "NoSuchMethodException: android.content.res.CompatResources.getLoaders []" when starting from Android Studio
Running Tests
  • Issue #163791525: INSTALL_PARSE_FAILED_NO_CERTIFICATES when running test on multiple devices
  • Issue #162006827: Robolectric tests run in Android Studio 4.1 fail with a bad ASM dependency
Upgrade Assistant
  • Issue #156100314: Consider handling Crashlytics versions in the upgrade assistant
Windows & Menus