Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

Core

Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
October 9, 2019 1.1.0 - 1.2.0-beta01 -

Declaring dependencies

To add a dependency on Core, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    def core_version = "1.1.0"

    // Java
    implementation "androidx.core:core:$core_version"
    // Kotlin
    implementation "androidx.core:core-ktx:$core_version"

    // To use RoleManagerCompat
    def core_role_version = "1.0.0-alpha01"
    implementation "androidx.core:core-role:$core_role_version"
}

For more information about dependencies, see Add Build Dependencies.

Version 1.2.0

Version 1.2.0-beta01

October 9, 2019

androidx.core:core:1.2.0-beta01 and androidx.core:core-ktx:1.2.0-beta01 released. Version 1.2.0-beta01 contains these commits.

API Changes

  • Added support for creating NotificationCompat Actions using IconCompat and deprecated a public field (and its getter) using resource IDs to represent icons for Actions. (aosp/1119192)
  • Add MathUtils.clamp for longs (aosp/1117300)
  • Added setChronometerCountDown to NotificationCompat (b/138601213)

Bug Fixes

  • Fixed an issue with the handling of unicode digits in address detection. (aosp/1129852)

External Contribution

  • Thank you Sergey Zakharov for enabling the API lint check for MissingBuild and ListenerLast in AndroidX! (aosp/1119191, aosp/1126768)

Version 1.2.0-alpha04

September 5, 2019

androidx.core:core:1.2.0-alpha04 and androidx.core:core-ktx:1.2.0-alpha04 are released. The commits included in this version can be found here.

API changes

  • Deprecated ShortcutInfoCompat.Builder#setLongLived() and replaced it with a new API with the same name that accepts a boolean as a parameter, to match the similar API in ShortcutInfo.Builder in Android framework.
  • Added ShortcutInfoCompat.Builder#setRank() and ShortcutInfoCompat#getRank() to match the ShortcutInfo in Android framework.

Bug fixes

Version 1.2.0-alpha03

August 7, 2019

androidx.core:core:1.2.0-alpha03 and androidx.core:core-ktx:1.2.0-alpha03 are released. The commits included in this version can be found here.

New features

  • Added UriCompat.toSafeString(Uri) to provide URI escaping that is updatable separately from the platform. (b/130878326)
  • Added Predicate<T> interface to provide Java 8-style predicates without requiring Java 8 language features.

API changes

  • Made removeDynamicShortuct() static (b/134993204)
  • Created factory method for BlendMode Color Filter (b/135943149)
  • Added async, counter, and isEnabled to TraceCompat (aosp/987332)
  • Unhid APIs in WindowInsetsCompat and ViewDragHelper (aosp/979408)

Bug fixes

  • Fixed bug with NestedScrollView scrolling in response to a11y scroll calls. (aosp/971000)
  • Switched to using SimpleArrayMap in ViewCompat implementation (aosp/1012534)
  • Fixed bug where FingerprintManager incorrectly checked PackageManager on API Level 23 (b/124066957)

Version 1.2.0-alpha02

June 13, 2019

androidx.core:core:1.2.0-alpha02 and androidx.core:core-ktx:1.2.0-alpha02 are released. The commits included in this version can be found here.

API changes

  • Added WindowInsetsCompat.wrap() and unwrap(), to be able to wrap and unwrap WindowInsets instances

Core Version 1.2.0-alpha01

May 7, 2019 androidx.core:core:1.2.0-alpha01 are androidx.core:core-ktx:1.2.0-alpha01 are released.

New features

  • Add ACTION_PAGE_UP/DOWN/NEXT/PREVIOUS accessibility actions
  • Add CATEGORY_NOTIFICATION to NotificationCompat
  • Add support for contextual Notification Actions
  • Add support for bubbles in NotificationCompat
  • Added BlendModeCompat APIs to leverage the BlendMode APIs on Android Q and falling back to PorterDuff.Mode equivalents wherever possible
  • Add new getters to WindowInsetsCompat and ViewCompat
  • Add support for tap-to-edit in notifications
  • DrawerLayout system gesture exclusion rects
  • Add NotificationCompat API for whether to allow system generated contextual actions
  • Handle disabled <activity-alias> components in NavUtils
  • Add AccessibilityNodeInfoCompat.setEntryKey

Bug fixes

  • Fix exception when loading fonts in TypefaceCompat
  • Various DayNight fixes
  • Fix backwards compatibility for bundle key strings between 28.0 (support library) and 1.1 (AndroidX) in EditorInfoCompat, ShareCompat, WakefulBroadcastReceiver and InputConnectionCompat

Version 1.1.0

Version 1.1.0

September 5, 2019

androidx.core:core:1.1.0 and androidx.core:core-ktx:1.1.0 are released. The commits included in this version can be found here.

Important Changes since 1.0.0

  • Updated accessibility APIs to match the Android 10 platform accessibility APIs
  • Added improvements to Nested Scrolling; see NestedScrollingChild3 and NestedScrollingParent3.
  • This library no longer exposes the androidx.collection dependency as part of its API. If you were depending on the androidx.collection types implicitly through a dependency on Core, you will need to add an explicit androidx.collection dependency to your library or app. This change is source-incompatible but retains binary compatibility. The Collection dependency is still a transitive dependency of Core but as an implementation detail instead of part of its API.
  • Worked around an IPC compatibility issue caused by refactor to androidx (aosp/948725, aosp/938269)
  • Added a variety of fixes for AppCompat DayNight (aosp/942956)

Version 1.1.0-rc03

August 7, 2019

androidx.core:core:1.1.0-rc03 and androidx.core:core-ktx:1.1.0-rc03 are released. The commits included in this version can be found here.

Bug fixes

  • Make the hidden androidx.core.app.ComponentActivity implement LifecycleOwner to maintain binary compatibility with androidx.fragment:fragment:1.0.0 (aosp/1094409)

Version 1.1.0-rc02

July 2, 2019

androidx.core:core:1.1.0-rc02 and androidx.core:core-ktx:1.1.0-rc02 are released. The commits included in this version can be found here.

Bug fixes

  • FingerprintManagerCompat#getFingerprintManagerOrNull on API level 23 should not check PackageManager (b/124066957) (aosp/987433)
  • Fix equality comparison in AccessibilityNodeInfoCompat (aosp/985736)

Version 1.1.0-rc01

June 5, 2019

androidx.core:core:1.1.0-rc01 and androidx.core:core-ktx:1.1.0-rc01 are released. The commits included in this version can be found here.

Bug fixes

  • Make image keyboard API backport compatible to all previous impls (aosp/968220)
  • Remove Guava ListenableFuture from androidx.core:core library dependencies (b/133171974, aosp/965393)
  • Fix incorrect velocity while flinging with nested scrolling. (aosp/961642)
  • Add test for mutating TransitionDrawable (b/37033322)

Version 1.1.0-beta01

May 7, 2019

androidx.core:core:1.1.0-beta01 and androidx.core:core-ktx:1.1.0-beta01 are released. The commits included in this version can be found here.

The initial release of AndroidX broke backwards compatibility for Support Library compat APIs that are used for inter-process communication, sending keyed data in bundles. This release fixes this compatibility, restoring communication between code built with Support Library 28.0 (or earlier) and AndroidX 1.1 (or later).

API changes

  • Undeprecated capability setters (aosp/937281)
  • RemoteActionCompat is now a 1VersionedParcelable` (aosp/928534)

Bug fixes

  • AppCompatTextView in core tests should be created with an appcompat theme (aosp/951636)
  • Use pre-1.0 string values for InputConnectionCompat (aosp/948725)
  • Use pre-AndroidX strings as fallback interop for bundle keys (aosp/938269)
  • Fixed bug in DayNight updates when in background (aosp/942956)
  • Implemented text entry key API for accessibility services in AOSP Keyboard (aosp/943897)
  • Fixed exception when loading font on devices running API Level 20 and lower
  • Handle disabled <activity-alias> components in NavUtils (aosp/940788)

Version 1.1.0-alpha05

March 13, 2019

androidx.core:core:1.1.0-alpha05 and androidx.core:core-ktx:1.1.0-alpha05 are released. The full list of commits included in this version can be found here.

New features

  • New ActivityCompat.recreate() API for working around pre-28 platform bugs (aosp/898940)
  • New LocationManagerCompat class (aosp/894736)

API changes

  • This library no longer exposes the ‘collection’ dependency as part of its API. If you were depending on the ‘collection’ types implicitly through a dependency on ‘core’, you will need to add an explicit ‘collection’ dependency to your library or app. This change is source-incompatible but retains binary compatibility. The ‘collection’ dependency is still a transitive dependency of ‘core’ but as an implementation detail instead of part of its API.

Bug fixes

  • Fixed bug with default tint mode for ImageView on devices running API level 21

Version 1.1.0-alpha04

January 30, 2019

androidx.core:core 1.1.0-alpha04 and androidx.core:core-ktx 1.1.0-alpha04 are released.

API changes

  • Change value of EXTRA_SHORTCUT_ID to be consistent with the platform (aosp/877712)
  • Add CATEGORY_NOTIFICATION to NotificationCompat (aosp/861067)

Bug fixes

  • Fix for fontFamily not working on devices running API level 24 and lower (aosp/807054)
  • Fixed bug where replacing accessibility actions, and adding accessibility actions, didn't remove old accessibility actions (aosp/848314)

Version 1.1.0-alpha03

December 17, 2018

androidx.core 1.1.0-alpha03 and androidx.core-ktx 1.1.0-alpha03 are released with the following changes. androidx.core-ktx 1.1.0-alpha02 is released to provide a ktx match for androidx.core 1.1.0-alpha02.

New features

  • Added Notification channels methods to NotificationManagerCompat so developers can use only NotificationManagerCompat when working with notifications. Special thanks to Zdeněk Kořán for this new feature!

API changes

  • Added new APIs to ShortcutManagerCompat to publish and update dynamic shortcuts.

Version 1.1.0-alpha01

November 5, 2018

androidx.core 1.1.0-alpha01 is released with the following API changes and bug fixes.

New features and API changes

  • NestedScrollingChild3 and NestedScrollingParent3 add the ‘consumed’ parameter to the overloaded dispatchNestedScroll and * onNestedScroll methods so that the view that drives nested scrolling can be better informed about how much scroll distance was * consumed by parents in each nested scroll pass.
  • NestedScrollView now implements NestedScrollingChild3 and NestedScrollingParent3, and therefore, the NestedScrollingChild2 and * NestedScrollingParent2 implementations of dispatchNestedScroll and onNestedScroll are not guaranteed to be called. Developers * counting on either being called should also override the new nested scrolling 3 version of dispatchNestedScroll and onNestedScroll.
  • ShortcutInfoCompat has the following new fields: Persons, categories and isLongLived. Done to advertise it can accept various types * of content.
  • Renamed SupportActivity to ComponentActivity. See androidx.activity for more info.
  • Added getMainExecutor() method, which returns an Executor link that will run enqueued tasks on the main thread associated with that * context.
  • Added compatibility implementation of Resources.getFloat.
  • Added Results Source to compat RemoteInput. This allows apps to distinguish direct and smart replies for logging purposes.
  • Added Kotlin extension functions for TextView TextWatcher actions.
  • Deprecated AccessibilityNodeInfo capability and flag setters; use actions instead.
  • Added AccessibilityPane to ViewCompat.
  • Exposed ClickableSpans on pre-O devices through the addition of AccessibilityClickableSpanCompat.
  • Deprecated AccessibilityNodeInfoCompat.setFocusable(), setClickable(), setLongClickable(), setScrollable(), and setContextClickable(). Added AccessibilityActions instead.
  • Added ViewCompat.setAccessibilityPaneTitle(), getAccessibilityPaneTitle(), setScreenReaderFocusable(), isScreenReaderFocusable(), setAccessibilityHeading(), and isAccessibilityHeading(), to backport this View accessibility functionality through API 19.
  • Added ViewCompat.enableAccessibleClickableSpanSupport() to allow developers to make non-URL ClickableSpans accessible back through API 19.

Bug fixes

  • Fixed bug that caused ResourcesCompat.getFont() crash when the network fails, when using downloadable fonts.
  • Fixed Null Pointer Exception in TypefaceCompatApi21 that occurred when ContentResolver returned null.
  • Fixed type error in Array Utils where it expected ColorStateList but got raw colors.

Core-Role Version 1.0.0

Core-Role Version 1.0.0-alpha01

July 2, 2019

androidx.core:core-role:1.0.0-alpha01 is released. This is the first release of androidx.core:core-role. The commits included in this initial version can be found here.

New features

  • Added RoleManagerCompat containing the name and documentation for roles that might be available in the system.

Version 1.0.2

Version 1.0.2

May 7, 2019

androidx.core:core:1.0.2, and androidx.core:core-ktx:1.0.2 are released. This release includes 2 commits.

The initial release of AndroidX broke backwards compatibility for Support Library compat APIs that are used for inter-process communication, sending keyed data in bundles. This release fixes this compatibility, restoring communication between code built with Support Library 28.0 (or earlier) and AndroidX 1.1 (or later).

Bug fixes

  • Use pre-1.0 string values for InputConnectionCompat (aosp/948725)
  • Use pre-AndroidX strings as fallback interop for bundle keys (aosp/938269)

Version 1.0.1

Version 1.0.1

November 7, 2018

Bugfix release of core-1.0.1 and appcompat-1.0.2.

Bug fixes

  • Fixed bug where PrecomputedTextCompat would crash when used with RTL AppCompatTextView. b/113070424

Core-Ktx Version 1.0.1

November 5, 2018

androidx.core-ktx 1.0.1 is released with the following bug fixes:

  • Fixed bug where implementation of union and intersection were swapped.