Status Update
Comments
om...@gmail.com <om...@gmail.com> #2
First of all thanks for this detailed issue.
This issue had been investigated thoroughly when it was first reported internally. The surprising detail in this report is that the issue is not reproducible before 1.7
. I will look into this.
The main problem with POBox is the fact that it is deprecated. Since 2021 Sony has been shipping new Xperia devices with Gboard pre-installed. Although we are aware that there is still a considerable amount of users still using POBox, the described behavior is caused by POBox's noncompliant behavior with InputConnection
and InputMethodManager
documentation. However, this is understandable since TextView
implementation was also not respecting the behavior that is expected from Editors.
Ultimately we have decided to enforce the documented behavior with specifically regards to when editors should call InputMethodManager.updateSelection
. Also, although unconfirmed, there were traces of possible custom code being included in Sony OEM images that changed how InputMethodManager was notified from TextView. If POBox also depended on something like this, it would be impossible for Compose code to replicate the same unknown behavior.
b9...@gmail.com <b9...@gmail.com> #3
Or is that option not available?
Even if the root cause is POBox, from the perspective of the app's customers, it looks like an app bug, so this issue is a blocker against updating Jetpack Compose.
yu...@gmail.com <yu...@gmail.com> #4
Just to be sure, it is dangerous to replace Compose TextField with Android View EditText as a workaround for this issue.
Compose 1.7 has a bug that causes ANR when the focus is on EditText.
Another View-related bug in Compose 1.7 is that an Android View is focused by calling FocusManager.clearFocus().
Perhaps there is a lack of testing of Compose 1.7 in combination with Android View. There is also a possibility that there are other fatal bugs related to View.
In other words, the only options for apps targeting the Japanese market that require POBox support are to continue using Compose 1.6 or to use EditText in combination with various workarounds.
ae...@google.com <ae...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Halil Ozercan <
Link:
Fix POBox keyboard issue
Expand for full commit details
Fix POBox keyboard issue
Fix: 373743376
Fix: 329209241
Test: NullableInputConnectionWrapperTest
Change-Id: I94e0e598274fb88b255f977f9fbd50dfbbb1ecb1
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapperTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapper.android.kt
Hash: 57f58c4b80d5d8470b2aca325dfdcd55f235231e
Date: Thu Oct 24 01:25:20 2024
au...@google.com <au...@google.com> #6
Many thanks again for this report. Especially for giving us a huge clue in terms of what could be going wrong. The fix is now merged and I will ask for a cherry-pick into a stable release.
au...@google.com <au...@google.com> #7
Do you have any concrete plan to cherry-pick the fix into current stable version (1.7.x)? We are currently waiting it.
au...@google.com <au...@google.com> #8
Yes, this fix is planned to be included in a future 1.7.x
release.
ky...@gmail.com <ky...@gmail.com> #9
Thanks for the fix. Sorry to follow up on this. is it possible for you to share specific release version/date for the stable version? We are waiting on this to decide on our direction.
b9...@gmail.com <b9...@gmail.com> #10
om...@gmail.com <om...@gmail.com> #11
I test the case #9 describe with 1.0.0-rc01
and 1.0.0-rc02
It turns out that it is not related to the compose_version.
If you build from gradle via command line, it will just works fine.
But run in IDE it will crash.
go...@maax.gr <go...@maax.gr> #12
ma...@gmail.com <ma...@gmail.com> #13
I don't think this is an Android Studio issue. I updated three existing projects to AGP 7.1.0-alpha04 and all of them broke. They all throw the exception listed in the original report.
If I roll each project back to AGP 7.1.0-alpha03 they all work again, even if I build from AS Bumblebee 2021.1.1 Canary 4.
It certainly seems to be an AGP issue, to me.
ga...@google.com <ga...@google.com> #14
I'm able to reproduce, looking into it now.
ga...@google.com <ga...@google.com> #15
The issue is that AGP passes min api level 21 to D8 causing it to remove the default methods from DefaultLifecycleObserver
(make them abstract) but it does not pass desugaring classpath when rewriting invocations in AndroidComposeView.onAttachedToWindow
.
b9...@gmail.com <b9...@gmail.com> #16
Another workaround is to change the deploy option from Default APK
to APK from app bundle
, then we could deploy to device via Android Studio.
ga...@google.com <ga...@google.com> #17
Current workaround is to (temporarily) increase your minSdkVersion
to 24+ in build.gradle
file.
jo...@gmail.com <jo...@gmail.com> #18
This issue isn't related to Canary 4. I had this issue with Canary 4 but uninstalled it and then installed Arctic Fox (2020.3.1) RC 1 and this issue was still there. Changing the minSdkVersion to 24+ does fix the problem.
ga...@google.com <ga...@google.com> #19
To clarify, the issue is not in Android Studio (the IDE), but it is in the Android Gradle plugin.
b9...@gmail.com <b9...@gmail.com> #20
ga...@google.com <ga...@google.com> #21
This is because when building from the IDE, AGP knows the API of the device which is used for deployment. This information is used to optimize the dexing pipeline (e.g avoid desugaring unless you run on device 23-). In AGP 7.1.0-alpha04 we introduced a bug where:
- the api version used for dexing is
minSdkVersion
e.g 21 - because we deploy to a device 24+ (e.g 30), desugaring is not requested
This means that D8 (dex compiler) will strip interface method and make them abstract, but it will not perform full rewriting, which leads to AbstractMethodError
.
When building from the command line, minSdkVersion used for dexing and deciding if desugaring should be performed is the same, so that's why you see no issues.
b9...@gmail.com <b9...@gmail.com> #22
ga...@google.com <ga...@google.com> #23
This will be fixed in AGP 7.1.0-alpha06. Until that version is released, you can use workarounds from #21.
Change id: Ifcdc39995ff4f05c4bdfd4622127e15dd0f33d4d
ma...@aexp.com <ma...@aexp.com> #24
This also seems to happen in Bumblebee Canary 3 with Compose 1.1.0-Beta01.
ga...@google.com <ga...@google.com> #25
Re #24: Can you please file a separate issue with a sample project, idea.log, build output, and logcat crash info?
fr...@daon.com <fr...@daon.com> #26
ga...@google.com <ga...@google.com> #27
Re #26: This issue should be fixed in AGP 7.1.3. Can you please file a new bug with details listed in #25?
be...@crisalid.com <be...@crisalid.com> #28
Is there any similar report that isn't 1 or 2 years old?
sh...@gmail.com <sh...@gmail.com> #29
I have error please fix it with YouTube premium
be...@gmail.com <be...@gmail.com> #30
ga...@google.com <ga...@google.com> #31
Re #30: Can you please file a separate issue with a sample project that reproduces the bug? See
be...@gmail.com <be...@gmail.com> #32
I could fix the problem by upgrading minSdkVersion from 21 to 24. But, it's not the fix I wanted. I didn't understand the #21 workaround. Can you explain more about?
Description
Jetpack Compose release version:
1.0.0-rc01
Android Studio Build:
Emulator Version:
30.8.1
Device:
Steps to Reproduce:
And it will crash, with those logs: