App crash on devices with Android version less than 23
See original GitHub issuePlease complete the following information:
- Library Version 1.4.6
- Affected Device(s) emulator device with Android 5.1
Describe the Bug:
Following crash occurs while trying to show balloon on devices with Android sdk version 22 and older.
java.lang.NoSuchMethodError: No virtual method setForeground(Landroid/graphics/drawable/Drawable;)V in class Landroidx/appcompat/widget/AppCompatImageView; or its super classes (declaration of 'androidx.appcompat.widget.AppCompatImageView' appears in /data/app/nozy.video.livestream-1/base.apk)
at com.skydoves.balloon.Balloon.initializeArrow$lambda-5$lambda-4(Balloon.kt:286)
at com.skydoves.balloon.Balloon.$r8$lambda$6QerMEq1X1Gznc0_SUWDE5bxR6I(Balloon.kt)
at com.skydoves.balloon.Balloon$$ExternalSyntheticLambda6.run(D8$$SyntheticClass)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Apparently, View.setForeground
method added in api level 23 (https://developer.android.com/reference/android/view/View#setForeground(android.graphics.drawable.Drawable)), but the documentation claims that the library supports API 17+. I see “NewApi” lint warnings were suppressed 😃
Expected Behavior:
Balloon library should not cause a crash because of usage of View.setForeground
method on devices with API Level greater than 16.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Android: the app crashes if I run it on a device with API 24 or ...
SOLVED: Find out that the problem was about the way in which I was trying to manage files from one app (the main...
Read more >Here's how to fix those mysterious Android WebView crashes
To use WatfordHert's method, go to the main Android Settings menu, then tap "Apps & Notifications" (just "Applications" on some phones). Find ...
Read more >Fix an installed Android app that isn't working - Google Help
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >Flutter app crashes on start on Android: couldn't find "libflutter ...
This should fix the problem. You simply have to rerun the fullter build {appbundle/apk} again. To verify the results compare the two builds...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ozaneb This has been released in version
1.4.7
. Thanks for reporting this issue!Hey, now it works properly, thanks!