Fixed
Status Update
Comments
ku...@google.com <ku...@google.com>
ku...@google.com <ku...@google.com> #2
Can you provide the below requested information to better understand the issue:
Steps to reproduce
Please provide a sample application or apk to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Expected output
Could you please explain the expected behavior.
Current output
Could you please explain the current behavior.
Steps to reproduce
Please provide a sample application or apk to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Expected output
Could you please explain the expected behavior.
Current output
Could you please explain the current behavior.
ba...@liip.ch <ba...@liip.ch> #3
Here is a sample app
**Steps to reproduce**
- Try to compile the project and see the error in MainActivity.kt
- Edit build.gradle by not using the alpha version of KTX (use the current stable one) and see that it compiles
**Expected output**
The project compiles with newer versions of KTX
**Current output**
The project doesn't compile
**Steps to reproduce**
- Try to compile the project and see the error in MainActivity.kt
- Edit build.gradle by not using the alpha version of KTX (use the current stable one) and see that it compiles
**Expected output**
The project compiles with newer versions of KTX
**Current output**
The project doesn't compile
ku...@google.com <ku...@google.com>
ki...@google.com <ki...@google.com> #4
ComponentActivity is part of androidx.activity and not androidx.core.
In this particular case, you're "mixing" alpha and stable releases. Change the appcompat dependency to this:
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
In this particular case, you're "mixing" alpha and stable releases. Change the appcompat dependency to this:
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 48e9a199bb88dc3ea79043b541ff8a0ae174b09c
Author: Ian Lake <ilake@google.com>
Date: Wed Jul 31 10:24:02 2019
Restore @hide Core 1.1.0 binary compatibility
Make androidx.core.app.ComponentActivity
implement LifecycleOwner to maintain binary
compatibility with Core 1.0.0.
This fixes compatibility issues where devs
could upgrade to Core 1.1.0 and not Fragment
1.1.0 and have their FragmentActivity /
AppCompatActivity no longer be considered
a LifecycleOwner.
This is essentially a revert to the changes to
androidx.core.app.ComponentActivity from
https://android-review.googlesource.com/743643
Test: Ran in a sample app, tested with Fragments 1.0 and 1.1.0
BUG: 126612680
Change-Id: I10493f8138120cfa76255c0830a795e415fb1316
M core/core/api/restricted_1.2.0-alpha03.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/ComponentActivity.java
https://android-review.googlesource.com/1094409
https://goto.google.com/android-sha1/48e9a199bb88dc3ea79043b541ff8a0ae174b09c
Branch: androidx-master-dev
commit 48e9a199bb88dc3ea79043b541ff8a0ae174b09c
Author: Ian Lake <ilake@google.com>
Date: Wed Jul 31 10:24:02 2019
Restore @hide Core 1.1.0 binary compatibility
Make androidx.core.app.ComponentActivity
implement LifecycleOwner to maintain binary
compatibility with Core 1.0.0.
This fixes compatibility issues where devs
could upgrade to Core 1.1.0 and not Fragment
1.1.0 and have their FragmentActivity /
AppCompatActivity no longer be considered
a LifecycleOwner.
This is essentially a revert to the changes to
androidx.core.app.ComponentActivity from
Test: Ran in a sample app, tested with Fragments 1.0 and 1.1.0
BUG: 126612680
Change-Id: I10493f8138120cfa76255c0830a795e415fb1316
M core/core/api/restricted_1.2.0-alpha03.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/ComponentActivity.java
an...@google.com <an...@google.com> #6
il...@google.com <il...@google.com> #7
AndroidX follows semantic versioning and this extends to our restricted APIs in our artifacts as well (since they are, across artifacts, a defacto API surface). As such, we've decided to restore the underlying API surface that was driving AppCompat 1.0 so that you don't run into issues when using Core 1.1.0 and AppCompat 1.0 / Fragment 1.0.
This fix will be available in Core 1.1.0-rc03 and 1.2.0-alpha03.
This fix will be available in Core 1.1.0-rc03 and 1.2.0-alpha03.
Description
implementation 'androidx.core:core-ktx:1.0.1'
==> ComponentActivity implements LifeCycleOwner.
When using
implementation 'androidx.core:core-ktx:1.1.0-alpha04'
==> ComponentActivity does not implement LifeCycleOwner.
This has a big impact because AppCompatActivity extends ComponentActivity and so any activity that extends AppCompatActivity will be impacted by this change. For instance any activity that needs to be a lifecycleowner to observe a LiveData from a viewmodel
I couldn't find any release note or explanation about why this has changed. Has this changed on purpose or is it a bug in the alpha version?