iOS Development

android – Having difficulty in creating cordova plugin and in addition having drawback in importing it in ionic cordova challenge

Spread the love


I wish to create a cordova plugin in my native system however having difficulty whereas importing and putting in it in my ionic cordova challenge, i’m having error whereas making an attempt to import the cordova plugin in ionic cordova challenge, so i desire a answer that how i create a cordova challenge in my native system first then after testing will to publish it.
I’m utilizing beneath versions-
ionic -v
7.2.0
cordova -v
12.0.0 ([email protected])
npm -v
10.2.3
node -v
v18.19.0
nvm -v
1.1.11

Error –
Error:
Construct at: 2024-01-29T14:45:00.196Z – Hash: 4798c2666d0154ce – Time: 1087ms
Error: src/app/residence/residence.web page.ts:25:29 – error TS2307: Can not discover module ‘io.electrosoft.helloworld’ or its corresponding kind declarations.
25 import HelloTestPlugin from ‘io.electrosoft.helloworld’;
import { HelloTestPlugin } from ‘io.electrosoft.helloworld’;
× Didn’t compile.

Getting error in each methods, whereas importing the plugin.

I’m having beneath information and folders in my cordova plugin
HelloTestPluginplugin.xml
HelloTestPluginsrc
HelloTestPluginsrcandroid
HelloTestPluginsrcandroidHelloTestPlugin.java
pluginHelloTestPluginwww
HelloTestPluginwwwHelloTestPlugin.js
HelloTestPluginpackage.json

I attempted creating cordova plugin having beneath information in my cordova plugin –
HelloTestPluginplugin.xml
HelloTestPluginsrc
HelloTestPluginsrcandroid
HelloTestPluginsrcandroidHelloTestPlugin.java
pluginHelloTestPluginwww
HelloTestPluginwwwHelloTestPlugin.js
HelloTestPluginpackage.json

However not in a position to entry and import this in my ionic cordova proejct.

I wish to create a cordova plugin in my native system and after testing it then i wish to publish it, I wish to import that cordova challenge in my ionic cordova challenge for each android and ios platform.

Leave a Reply

Your email address will not be published. Required fields are marked *