Closed b4rtt closed 6 years ago
Looks like an android support library bug, might try updating all your android SDKs/libs. Also, you might have to check your project and confirm you don't lock in a version of the support lib in the project or that a dependency doesn't since plugins can specify deps also.
First try updating your local sdks and lets see though.
I tried to update local SDK and it's still same.
Can you clone and run the demo and see if you get this build error? If not, then we can isolate to your project and not a bigger issue 👍
same problem
For me its working fine in android emulator. when i run it in android device it is show the same error
Tested 3 emulators: 1) Android 5.1.1 API Level 22 -> error 2) Android 6.0 API Level 23 -> error 3) Android 7.1.1 API Level 25 -> works fine
Same error on device and emulator, I have run your provided demo but no success
@triniwiz - any thoughts?
@bradmartin i'll test on the lower apis 😄
Same here:
JS: ERROR Error: Uncaught (in promise): Error: java.lang.NullPointerException: Attempt to invoke virtual method 'void co.fitcom.fancywebview.CustomTabsServiceConnectionCallBack.setWebViewListener(co.fitcom.fancywebview.AdvancedWebViewListener)' on a null object reference
JS: co.fitcom.fancywebview.AdvancedWebView.setWebViewListener(AdvancedWebView.java:60)
JS: co.fitcom.fancywebview.AdvancedWebView.<init>(AdvancedWebView.java:34)
JS: com.tns.Runtime.callJSMethodNative(Native Method)
JS: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
JS: com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
JS: com.tns.Runtime.callJSMethod(Runtime.java:957)
JS: com.tns.Runtime.callJSMethod(Runtime.java:941)
JS: com.tns.Runtime.callJSMethod(Runtime.java:933)
try calling init() function in app.component.ts rather than main.ts if you are working with nativescript angular.
Well spotted, that worked!
Hi, plugin works very well on iOS but when I try to open webview on android it doesn't work and I get this error.
` JS: Error: java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.customtabs.CustomTabsSession android.support.customtabs.CustomTabsClient.newSession(android.support.customtabs.CustomTabsCallback)' on a null object reference JS: co.fitcom.fancywebview.AdvancedWebView.(AdvancedWebView.java:35)
JS: com.tns.Runtime.callJSMethodNative(Native Method)
JS: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
JS: com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
JS: com.tns.Runtime.callJSMethod(Runtime.java:957)
JS: com.tns.Runtime.callJSMethod(Runtime.java:941)
JS: com.tns.Runtime.callJSMethod(Runtime.java:933)
JS: com.tns.gen.java.lang.Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.onClick(Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.java:12)
JS: android.view.View.performClick(View.java:5610)
JS: android.view.View$PerformClick.run(View.java:22265)
JS: android.os.Handler.handleCallback(Handler.java:751)
JS: android.os.Handler.dispatchMessage(Handler.java:95)
JS: android.os.Looper.loop(Looper.java:154)
JS: android.app.ActivityThread.main(ActivityThread.java:6077)
JS: java.lang.reflect.Method.invoke(Native Method)
JS: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
JS: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
`