Scribe-Android
Scribe-Android copied to clipboard
app crashing at startup on api 30
Terms
- [X] I have searched all open bug reports
- [X] I agree to follow Scribe-Android's Code of Conduct
Behavior
when trying to launch the app on api 30 it crashes at startup
Process: be.scri.debug, PID: 11099
java.lang.RuntimeException: Unable to start activity ComponentInfo{be.scri.debug/be.scri.activities.SplashActivity}: java.lang.UnsupportedOperationException: Can't convert value at index 1 to color: type=0x1
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 1 to color: type=0x1
at android.content.res.TypedArray.getColor(TypedArray.java:533)
at android.app.Activity.onApplyThemeResource(Activity.java:5104)
at android.view.ContextThemeWrapper.initializeTheme(ContextThemeWrapper.java:216)
at android.view.ContextThemeWrapper.setTheme(ContextThemeWrapper.java:147)
at android.app.Activity.setTheme(Activity.java:5082)
at androidx.appcompat.app.AppCompatActivity.setTheme(AppCompatActivity.java:146)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3415)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Device type
Pixel 9 pro api 30
Versions
latest
One of the reasons this is happening is because the App uses features only available for API 33 and above. We would have to give else conditions for Versions other TIRAMISU in the program for such features.
@MostafaMohamed2002 , would you like to work on this after the current PR, or Can I try fixing the bug? :)
@MostafaMohamed2002 , would you like to work on this after the current PR, or Can I try fixing the bug? :)
I will give it a try
Let us know if any support is needed, @MostafaMohamed2002 :)
Hello @MostafaMohamed2002 did you reach a solution and PR is ready? :)
Hello @MostafaMohamed2002 did you reach a solution and PR is ready? :)
No , if you want to contribute go on
@angrezichatterbox I think you can start checking issue when it is possible to you.
Thanks for the discussion here, both of you! Please let us know if we can help somehow, @MahmoudMabrok :)
Hey @MahmoudMabrok , I hope you're doing well. Just checking in to see if you are still working on the issue. Happy to help in case you're facing any issues.
@angrezichatterbox I did not able to check it. if anyone can , please can he go.
@angrezichatterbox Can I give a try ?
@angrezichatterbox Sir, I checked my device's API, and it's 30. This is causing the error, but I can't come up with an idea on how to fix it. Can you suggest a way to resolve it ?
@angrezichatterbox Sir, I checked my device's API, and it's 30. This is causing the error, but I can't come up with an idea on how to fix it. Can you suggest a way to resolve it ?
It would look into it and get back to you :) . In the meantime, you are welcome to check the other issue using a simulator. Also, in this community, you are more than welcome to call me by my name rather than using sir 😄
@MahmoudMabrok, given that others are having issues working with lower APIs, would you be able to give some suggestions here or potentially open a PR if the change is not too involved? :) Any help would be appreciated! 😊
@andrewtavis I'll take it, if you don't mind.
Assigned, @linreal! And seeing the PR as well 😊 Totally amazing and looking forward to the review! :)
Closed by #402 🚀 Amazing to have this finalized! Thanks for the quick work, @linreal 😊
@angrezichatterbox and all: Do we need to factor in API <31 into testing in the future, or was this kind of a one off for this particular issue? What are the normal practices for testing across multiple APIs?