Status Update
Comments
ja...@gmail.com <ja...@gmail.com> #2
This has been fixed internally and will be available in the next release of Fragments.
de...@gmail.com <de...@gmail.com> #3
Sorry, that message is not correct yet.
de...@gmail.com <de...@gmail.com> #4
Branch: androidx-master-dev
commit 47c5e9d30d0304a7d1ac6a522c01a055b858ff28
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Aug 24 14:47:02 2020
Use view alpha to store the view animation state
Currently when using the new state manager, we save the visibility of
the view from onViewCreated() to do proper effects. This visibility
is restored after onStart() when any special effects are complete.
Because we always restore the visibility to whatever it was in
onViewCreated(), we fail to capture any changes that could have been
made by the user between onViewCreated() and onStart(). This means if
view animating in is set to INVISIBLE in onStart(), we force it back to
VISIBILE once the animation is complete.
Since there are still cases where users set their visibility directly on
their views, we need to ensure we are backward compatible. To do so,
instead of storing the view visibility, we should use the view alpha.
Anything above an alpha of 0 is considered visibile. Doing this means we
can handle the case where the visibility is changed, but the
suggestively more rare case of the alpha changing will suffer from the
old issue.
Test: FragmentViewTest, PostponedTransitionTest
Bug: 164481490
Change-Id: I9df6398af8e0404638e83b69319e4bd32bdbc3f2
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimationTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentViewTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/PostponedTransitionTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
ho...@gmail.com <ho...@gmail.com> #5
This has been fixed internally and will be available in the next release of Fragments.
da...@google.com <da...@google.com> #6
Thanks for the report I was able to reproduce the issue and indeed it occurs when using Kotlin 1.7.0. Sadly I don't have a workaround yet, but will investigate further.
da...@google.com <da...@google.com> #7
and just to clarify, we see the issue when using Room 2.4.2, but not with Room 2.5.0-alpha02.
yy...@gmail.com <yy...@gmail.com> #8
ma...@gmail.com <ma...@gmail.com> #9
I updated everything - It wasn't running.
With ext.kotlin_version = "1.6.21" - it is running.
za...@gotocme.com <za...@gotocme.com> #10
da...@google.com <da...@google.com> #11
Hey all, looks like the issue is related to a change in Kotlin's @Metadata
annotation and the way Room reads it, Room 2.4.2 is using an older version of the kotlinx-metadata-jvm
library which does not support reading Kotlin 1.7 information, where as in Room 2.5.0 we updated the library.
To workaround this issue please force upgrade the dependency by adding it to your annotation processor path, i.e. add kapt "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0"
if you are using Room 2.4.x.
Meanwhile, I'll work on releasing a Room 2.4.3 that is compatible with Kotlin 1.7 since Room 2.5.x is still in development.
si...@gmail.com <si...@gmail.com> #12
zs...@gmail.com <zs...@gmail.com> #13
Thanks! Do you think 2.4.3
is something that will be released in the next couple weeks? Trying to decide if I want to use the workaround or just wait until it is released.
da...@google.com <da...@google.com> #14
ge...@gmail.com <ge...@gmail.com> #15
da...@google.com <da...@google.com>
19...@gmail.com <19...@gmail.com> #16
pi...@gmail.com <pi...@gmail.com> #17
Maybe reopen this.
@Query("SELECT * FROM ${SetupData.TABLE_NAME}")
suspend fun selectAll(): Cursor
[ksp] SetupDataDao.kt:24: Not sure how to convert a Cursor to this method's return type (android.database.Cursor).
Duh!
- Room 2.5.2
- Kotlin 1.9
- KSP 1.9.0-1.0.11
te...@gmail.com <te...@gmail.com> #18
da...@google.com <da...@google.com> #19
The diagnosis is the same, Room needs to update its kotlinx-metadata-jvm dependency to be able to read Kotlin 1.9+ metadata. An upcoming patch release (Room 2.5.3) will have the dep updated.
da...@google.com <da...@google.com> #20
Alternative if you use the KSP version of Room, this shouldn't be an issue.
io...@gmail.com <io...@gmail.com> #21
ri...@gmail.com <ri...@gmail.com> #22
bl...@gmail.com <bl...@gmail.com> #23
da...@davwheat.dev <da...@davwheat.dev> #24
ra...@gmail.com <ra...@gmail.com> #25
ma...@gmail.com <ma...@gmail.com> #26
sh...@navi.com <sh...@navi.com> #27
rc has been out since 20th sept
mr...@gmail.com <mr...@gmail.com> #28
pa...@gmail.com <pa...@gmail.com> #29
ah...@gmail.com <ah...@gmail.com> #30
Upgraded room to version to 2.6.1 and the issue is resolved!
ni...@gmail.com <ni...@gmail.com> #31
Issue is still present if you want to return Cursor
Room 2.7.0-alpha12 kotlinVersion = "2.1.0" kspVersion = "2.1.0-1.0.29"
Sample: @Query("SELECT * FROM ${SetupData.TABLE_NAME}") suspend fun selectAll(): Cursor [ksp] Not sure how to convert a Cursor to this method's return type (android.database.Cursor).
Description
Component used: Room with suspend functions i.e. coroutines
error:
/Users/jayshah/AndroidStudioProjects/SampleMemoryNotes/app/build/tmp/kapt3/stubs/debug/com/example/samplememorynotes/framework/db/NoteDao.java:17: error: Not sure how to convert a Cursor to this method's return type (java.lang.Object). public abstract java.lang.Object getNoteEntity(long id, @org.jetbrains.annotations.NotNull()
Usage:
Version used:
Devices/Android versions reproduced on: Android emulator
If this is a bug in the library, we would appreciate if you could attach: