I have upgraded my existing ionic vue project to use capacitor 3 by following the upgrade doc here https://capacitorjs.com/docs/v3/updating/3-0
I have updated the plugin import part as per the docs,
I installed capacitor Network plugin, but getting error “Network” plugin is not implemented on android when I run the app in device or emulator
here is my code below
"dependencies": {
"@capacitor/android": "^3.0.0",
"@capacitor/app": "^1.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/haptics": "^1.0.0",
"@capacitor/keyboard": "^1.0.0",
"@capacitor/network": "^1.0.0",
"@capacitor/splash-screen": "^1.0.0",
"@capacitor/status-bar": "^1.0.0",
"@ionic/vue": "^5.4.0",
"@ionic/vue-router": "^5.4.0",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"vue": "^3.0.0-0",
"vue-router": "^4.0.0-0",
},
"devDependencies": {
"@capacitor/cli": "^3.0.0",
// App.vue
import { Network } from "@capacitor/network";
onMounted(() => {
Network.getStatus().then((conn) => {
network.connected = conn.connected;
if (!network.connected) {
toastRef.value.p1.data.message = "Not connected to internet";
toastOpen("p1", true);
}
});
});
do I have to change anything after upgrading to capacitor 3 ?
I removed android folder and added again using capacitor cli command npx cap add android
