Search code examples
androidionic-frameworkcapacitor

Ionic Capacitor Community Http Native - Not working in Android device or Emulator


I have been following the capacitor community http for ionic capacitor http calls in native. https://www.npmjs.com/package/@capacitor-community/http

I have tried the same in android emulator and device. However it gives java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Iterator com.getcapacitor.JSObject.keys() on a null object reference.

More Info on the error as below

result Http.get ERROR Error: NullPointerException at returnResult at win.androidBridge.onmessage

Note: I am using get method as per the documentation

Appreciate your response.

Using the below dependencies:

"@capacitor/android": "5.0.4", "@capacitor/app": "5.0.2", "@capacitor/core": "5.0.4",

enter image description here


Solution

  • That plugin has been revamped to official capacitor core plugin: CapacitorHttp