davidtakac/prognoza

Widget error

wolf-yuan-6115 opened this issue · 8 comments

I got this error when adding widget:

12-11 13:21:04.267 29118 29138 E GlanceAppWidget: Error in Glance App Widget                                          12-11 13:21:04.267 29118 29138 E GlanceAppWidget: java.lang.NoSuchMethodError: No virtual method isNightModeActive()Z in class Landroid/content/res/Configuration; or its super classes (declaration of 'android.content.res.Configuration' appears in /system/framework/framework.jar)                                                                           12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at s8.j.a(SourceFile:2)                                       12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at t8.c.h(SourceFile:5)                                       12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at t8.c$a.b0(SourceFile:1)                                    12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at l0.b.b0(Unknown Source:56)                                 12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e4.b.a(Unknown Source:178)                                 12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at t8.c.a(SourceFile:23)                                      12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at t8.a.a(Unknown Source:33)                                  12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at w3.e0.b0(SourceFile:1)                                     12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at l0.b.b0(Unknown Source:56)                                 12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.y.a(Unknown Source:30)                                  12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at w3.f0.b0(SourceFile:13)                                    12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at l0.b.b0(Unknown Source:56)                                 12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at androidx.activity.m.r(Unknown Source:21)                   12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.i$h.G(SourceFile:4)                                     12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at androidx.activity.m.w(SourceFile:3)
12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.i.Z(SourceFile:12)                                      12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.i.U(Unknown Source:13)                                  12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.v.k(SourceFile:2)                                       12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.n1.a(SourceFile:4)                                      12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at e0.v.v(Unknown Source:10)                                  12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at w3.c0$c.i(SourceFile:4)                                    12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at w3.c0$c.b0(Unknown Source:12)                              12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at k4.d.E(Unknown Source:4)                                   12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at k4.d.Q(SourceFile:3)                                       12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at w3.c0.f(SourceFile:2)                                      12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at w3.d0$a.i(Unknown Source:42)                               12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at wa.a.x(Unknown Source:8)                                   12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at nb.p0.run(Unknown Source:86)                               12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       at tb.a$a.run(SourceFile:9)                                   12-11 13:21:04.267 29118 29138 E GlanceAppWidget:       Suppressed: java.lang.NoSuchMethodError: No virtual method isNightModeActive()Z in class Landroid/content/res/Configuration; or its super classes (declaration of 'android.content.res.Configuration' appears in /system/framework/framework.jar)                                                         12-11 13:21:04.267 29118 29138 E GlanceAppWidget:               ... 29 more

Thank you for the logs! I'll investigate.

Thank you for the logs! I'll investigate.

Sorry that my logs is a little bit weird, I just copy them from Termux, it's adding some spaces automatically.

Not at all, I think they will be fine :) Could you tell me the device and android version?

Not at all, I think they will be fine :) Could you tell me the device and android version?

LineageOS 16.0 (Android 9), ASUS ZenFone 3 I remember
and I'm using Lawnchair 12 Alpha 4 as home screen.

I have the same error on Galaxy S7 LineageOS 16.0 (Android 9) with Kiss launcher 3.16.10. It might be worth mentioning that I have no GApps, just microG.

The problem is probably that we don't have the isNightModeActive method:
https://developer.android.com/reference/android/content/res/Configuration#isNightModeActive()
"Added in API level 30", which means Android 11.

Just pushed version 3.2.0 that fixes this issue. Feel free to reopen if it still happens.

Thank you, now it works on Android 9 too.