ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

RadCalendar : System.err: TypeError: applicationModule.systemAppearance is not a function #1311

Closed gyansoft786 closed 4 years ago

gyansoft786 commented 4 years ago

RadCalendar not working event in a new tns app.

tiny git repo = https://github.com/gyansoft786/rad-calendar.git

D:\gyan\cal>tns run android
Searching for devices...
Preparing project...
File change detected. Starting incremental webpack compilation...

webpack is watching the files…

Hash: 50b6356d97a974719821
Version: webpack 4.27.1
Time: 4526ms
Built at: 11/29/2019 2:48:16 PM
    + 430 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Building project...
Gradle build...
         + setting applicationId
         + applying user-defined configuration from D:\gyan\cal\App_Resources\Android\app.gradle
         + using android X library androidx.legacy:legacy-support-v4:1.0.0
         + adding nativescript runtime package dependency: nativescript-optimized-with-inspector
         + adding aar plugin dependency: D:\gyan\cal\node_modules\nativescript-ui-calendar\platforms\android\TNSCalendar-release.aar
         + adding aar plugin dependency: D:\gyan\cal\node_modules\nativescript-ui-core\platforms\android\TNSCore-release.aar
         + adding aar plugin dependency: D:\gyan\cal\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
Project successfully built.
The build result is located at: D:\gyan\cal\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Installing on device c7e3a40a...
Successfully installed on device with identifier 'c7e3a40a'.
Restarting application on device c7e3a40a...
Successfully synced application org.nativescript.cal on device c7e3a40a.
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.nativescript.cal/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: TypeError: applicationModule.systemAppearance is not a function
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.cal/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: TypeError: applicationModule.systemAppearance is not a function
System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2781)
System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2859)
System.err:     at android.app.ActivityThread.-wrap11(Unknown Source:0)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1592)     
System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
System.err:     at android.os.Looper.loop(Looper.java:164)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:6518)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: TypeError: applicationModule.systemAppearance is not a function
System.err:     at com.tns.Runtime.callJSMethodNative(Native Method)
System.err:     at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1209)
System.err:     at com.tns.Runtime.callJSMethodImpl(Runtime.java:1096)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1083)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1063)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1055)
System.err:     at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
System.err:     at android.app.Activity.performCreate(Activity.java:7023)
System.err:     at android.app.Activity.performCreate(Activity.java:7014)
System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2734)
System.err:     ... 9 more
alexonozor commented 4 years ago

I will recommend you using version 5 for now. npm i nativescript-ui-calendar@5.0.0

lini commented 4 years ago

The error happens because nativescript-ui-calendar@6.0.0 only supports the latest NativeScript modules and webpack versions. You need tns-core-modules 6.2.0+ and nativescript-dev-webpack 1.3.0+.

This is because of a breaking change in version 6 of the calendar package - support for dark mode on iOS and Android.

You can either continue using version 5 or update your app dependencies to the latest versions.

cdev38399 commented 4 years ago

I still having this issues on android, iOS is good.

✔ Component nativescript has 6.4.1 version and is up to date. ✔ Component tns-core-modules has 6.4.2 version and is up to date. ✔ Component tns-android has 6.4.1 version and is up to date. ✔ Component tns-ios has 6.4.2 version and is up to date.