Я выполнил эту команду: плагин ionic cordova add cordova-plugin-datepicker и npm install @ ionic-native / date-picker для установки datepicker на мой проект, он установлен без ошибок, но не работает в эмуляторе Android Studio после использованияИонный конденсатор запустить Android для построения.Я получаю эту ошибку в моей консоли Android Studio.
W/zygote: Attempt to remove non-JNI local reference, dumping thread
I/zygote: NativeAlloc concurrent copying GC freed 16(48KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 1683KB/3MB, paused 3.943ms total 144.104ms
W/zygote: Attempt to remove non-JNI local reference, dumping thread
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: DatePickerPlugin190798932, service: DatePickerPlugin, action: datetime, actionArgs: [{"mode":"datetime","date":"9\/19\/2019\/18\/55","minDate":"2019-09-19T17:50:59.296Z","maxDate":"2026-02-26T17:50:59.296Z","titleText":"","cancelText":"","okText":"","todayText":"","nowText":"","is24Hour":false,"androidTheme":2}]
W/System.err: java.lang.ClassNotFoundException: com.plugin.datepicker.DatePickerPlugin
W/System.err: at java.lang.Class.classForName(Native Method)
W/System.err: at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
W/System.err: at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:489)
at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:169)
W/System.err: at org.apache.cordova.PluginManager.exec(PluginManager.java:122)
at com.getcapacitor.MessageHandler.callCordovaPluginMethod(MessageHandler.java:73)
W/System.err: at com.getcapacitor.MessageHandler.postMessage(MessageHandler.java:46)
W/System.err: at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:7)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err: at android.os.Looper.loop(Looper.java:164)
W/System.err: at android.os.HandlerThread.run(HandlerThread.java:65)
W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.plugin.datepicker.DatePickerPlugin" on path: DexPathList[[zip file "/data/app/io.ionic.starter-j2Q6BUUNztI-lHcp9Iv4JQ==/base.apk"],nativeLibraryDirectories=[/data/app/io.ionic.starter-j2Q6BUUNztI-lHcp9Iv4JQ==/lib/x86, /system/lib, /vendor/lib]]
W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
W/System.err: ... 13 more
I/System.out: Error adding plugin com.plugin.datepicker.DatePickerPlugin.
E/Capacitor: Post message error:
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:171)
at org.apache.cordova.PluginManager.exec(PluginManager.java:122)
at com.getcapacitor.MessageHandler.callCordovaPluginMethod(MessageHandler.java:73)
at com.getcapacitor.MessageHandler.postMessage(MessageHandler.java:46)
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:7)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)