Closed StevenGBrown closed 3 years ago
An uncaught Exception occurred on "main" thread.
Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
Error: java.lang.NoSuchFieldError: no "I" field "O" in class "Landroid/os/Build$VERSION_CODES;" or its superclasses
You're welcome! Thank you for the quick turnaround.
When running Android prior to Oreo, android.os.Build.VERSION_CODES.O does not exist at runtime and so trying to use it produces an error. Instead, use the API level number (26) directly.
The VERSION_CODES work in Java code because the compiler replaces them with the numbers at build time, but that doesn't happen with JavaScript.