Closed hsombini closed 5 years ago
Thanks for reporting!
Fixed in v0.1.7+1 (0dbd1c2ebda2328fc4f4da58092f2ace767bc17f). Now the package checks if minSdkVersion
is >= 21 before adding code to change status bar color.
Hi, I just tested with v^0.1.7+2 on a Samsung Galaxy S3, API level 18 (using firebase testlab). I still get the same issue.
FATAL EXCEPTION: main
java.lang.NoSuchMethodError: android.view.Window.setStatusBarColor
at com.aljulanda.sama.MainActivity.onCreate(MainActivity.kt:15)
at android.app.Activity.performCreate(Activity.java:5372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
at android.app.ActivityThread.access$700(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
@Aljulanda9 can you check this again on v0.1.8+1? API check is now done using Build
class.
How to reproduce
The method android.view.Window.setStatusBarColor was introduced on API 21