Assigned
Status Update
Comments
su...@google.com <su...@google.com> #2
Forgot to note the environment.
This crash occurs on only API 21.
This crash occurs on only API 21.
cl...@gmail.com <cl...@gmail.com> #3
This crash occurs on API 22 and 23 when the user doesn't have Google Play installed. Related discussions: https://stackoverflow.com/q/41025200/842697
ma...@gmail.com <ma...@gmail.com> #5
For me this still persisted in 1.1.0-rc01 as well as 1.1.0-alpha01.
Only downgrading all my androidx version to the previously working state helped.
From:
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha10'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04'
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta04'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.core:core:1.2.0-alpha04'
back to:
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta03'
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta03'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0-rc01'
implementation 'androidx.preference:preference:1.1.0-rc01'
implementation 'androidx.core:core:1.2.0-alpha03'
Only downgrading all my androidx version to the previously working state helped.
From:
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha10'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04'
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta04'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.core:core:1.2.0-alpha04'
back to:
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta03'
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta03'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0-rc01'
implementation 'androidx.preference:preference:1.1.0-rc01'
implementation 'androidx.core:core:1.2.0-alpha03'
su...@google.com <su...@google.com> #6
If you want to use 1.1.0 , override applyOverrideConfiguration in your activity as follows. However, this might need app restart for API 21 to 25, while switching Dark Theme to Light Theme and vice versa.
override fun applyOverrideConfiguration(overrideConfiguration: Configuration?) {
if (Build.VERSION.SDK_INT in 21..25 && (resources.configuration.uiMode == AppConstants.appContext.resources.configuration.uiMode)) {
return
}
super.applyOverrideConfiguration(overrideConfiguration)
}
override fun applyOverrideConfiguration(overrideConfiguration: Configuration?) {
if (Build.VERSION.SDK_INT in 21..25 && (resources.configuration.uiMode == AppConstants.appContext.resources.configuration.uiMode)) {
return
}
super.applyOverrideConfiguration(overrideConfiguration)
}
ma...@gmail.com <ma...@gmail.com> #7
Any update? Issue reproduces with androidx.appcompat:appcompat:1.1.0...
su...@google.com <su...@google.com>
ad...@google.com <ad...@google.com> #8
Thank you guys for letting me know workarounds, I really appreciate that.
But here is not stack overflow.
I just want the bug of appcompat to be fixed.
There is some reasons like below why I point that it's bug of appcompat.
- androidx.appcompat supports api 21
- As far as I know, apparently there are no api 21 emulator supporting play store.
I hope developer experience to improve as much as possible.
Thanks
But here is not stack overflow.
I just want the bug of appcompat to be fixed.
There is some reasons like below why I point that it's bug of appcompat.
- androidx.appcompat supports api 21
- As far as I know, apparently there are no api 21 emulator supporting play store.
I hope developer experience to improve as much as possible.
Thanks
ma...@gmail.com <ma...@gmail.com> #9
I also encounter this issue on androidx.appcompat:appcompat:1.1.0 on lollipop
al...@google.com <al...@google.com> #10
al...@google.com <al...@google.com> #11
Can you let us know when this will be fixed?
ma...@gmail.com <ma...@gmail.com> #12
AppCompat 1.1.0-rc01 still works. (I did have to exclude appcompat 1.1.0 final dependency in my project that was coming from androidx preferences 1.1.0)
al...@google.com <al...@google.com> #13
Even I am getting this issue. Any update on this?
al...@google.com <al...@google.com> #14
qy...@gmail.com <qy...@gmail.com> #15
Have same issue ;[ Waiting for 1.1.1
ma...@gmail.com <ma...@gmail.com> #16
same issue for us, please fix it
sw...@gmail.com <sw...@gmail.com> #17
Having the same issue here for Android API 21 and 22 on actual devices.
an...@gmail.com <an...@gmail.com> #18
I just read 141351411 and I do not believe it to be a duplicate.
We are doing no long pressing in our app, simply opening an Activity that uses a WebView on Android 5 and 5.1 while using appcompat-1.1.0 crashes
Using appcompat-1.1.0-rc01 does not crash
And the specific commits referenced here appear on point, yet unrelated to long-pressing etc or resource wrapping.
it is trivial to reproduce and our project is open source, you can see the usage here if you like:https://github.com/ankidroid/Anki-Android/blob/master/AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java#L1408
We are doing no long pressing in our app, simply opening an Activity that uses a WebView on Android 5 and 5.1 while using appcompat-1.1.0 crashes
Using appcompat-1.1.0-rc01 does not crash
And the specific commits referenced here appear on point, yet unrelated to long-pressing etc or resource wrapping.
it is trivial to reproduce and our project is open source, you can see the usage here if you like:
so...@gmail.com <so...@gmail.com> #20
this is NOT duplicate of https://issuetracker.google.com/issues/141351441 , maybe it will be fixed same way, but it is not. This can use workaround from SO that was provided earlier here, but 141351441 wont be fixed that way.
ru...@groove.tech <ru...@groove.tech> #21
Also seeing this issue on Android 5 devices when inflating WebViews, has nothing to do with long press. Workaround mentioned in https://issuetracker.google.com/issues/141132133#comment6 seems to do the trick for now.
ha...@tpisoftware.com <ha...@tpisoftware.com> #22
Just wanted to mention that this is testable under Firebase test lab with several Android 21 and 23 devices.
I just confirmed that androidx.appcompat:appcompat:1.0.2 fixes this issue and it also appears to fix (though I didn't do a lot of testing of that one):
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
at com.android.webview.chromium.WebViewContentsClientAdapter.getDefaultVideoPoster(WebViewContentsClientAdapter.java:1181)
at org.chromium.android_webview.DefaultVideoPosterRequestHandler$1.run(DefaultVideoPosterRequestHandler.java:39)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.and
I just confirmed that androidx.appcompat:appcompat:1.0.2 fixes this issue and it also appears to fix (though I didn't do a lot of testing of that one):
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
at com.android.webview.chromium.WebViewContentsClientAdapter.getDefaultVideoPoster(WebViewContentsClientAdapter.java:1181)
at org.chromium.android_webview.DefaultVideoPosterRequestHandler$1.run(DefaultVideoPosterRequestHandler.java:39)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.and
Description
I recently noticed that after a fresh app install for a project that targets api 33, the launcher activity goes through an onCreate/onDestroy flow then it is created again.
I have the following setup:
app build.gradle: compileSdk 33, minSdk 24, targetSdk 33
root build.gradle
AndroidManifest activity declaration:
MainActivity Code:
Logs output on fresh start-up after app install:
Device used: Samsung Galaxy S22 Ultra, Android 13, One UI Version (if it matters) 5.1
Has anyone else encountered this? Is it normal for this to occur? This can cause problems if one relies on the fact that the Launcher activity should be started (onCreate lifecycle flow) only once on fresh app startup.