Skip to content Skip to sidebar Skip to footer

Fatal Exception: Java.lang.nosuchmethoderror: No Static Method Isdeviceprotectedstorage

When using cordova-plugin-firebase, I ran in to the following error: 04-27 16:59:35.745 6859 6859 E AndroidRuntime: FATAL EXCEPTION: main 04-27 16:59:35.745 6859 6859 E Android

Solution 1:

As per Android developer documentation isDeviceProtectedStorage was added in 24.0.0. If you are running the app below this mentioned API version, make a check for it

if (Build.VERSION.SDK_INT >= 24){
    //TODO: Do your stuff here.
}

https://developer.android.com/reference/android/support/v4/content/ContextCompat.html#isDeviceProtectedStorage(android.content.Context)

Post a Comment for "Fatal Exception: Java.lang.nosuchmethoderror: No Static Method Isdeviceprotectedstorage"