Issue
My ionic info is
Ionic:
Ionic CLI : 6.16.1 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.5
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 13.0.4
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
Android SDK Tools : 26.1.1 (/opt/android)
NodeJS : v14.16.1 (/usr/bin/node)
npm : 6.14.12
OS : Linux 5.10
The development environment uses a docker container. The image uses https://hub.docker.com/r/beevelop/ionic.
In the code below, platform.ready () does not work.
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
constructor(private platform: Platform) {
this.platform.ready().then(()=>{
alert("test");
});
}
}
For the operation verification, we used the actual android machine. I installed and confirmed the built apk file withadb install app-debug.apk
.
What may be the cause?
Solution
Please update your cordova platform to 10.1.1. after that will work your Cordova Platforms is : android 9.1.0
cordova platform rm android cordova platform add [email protected]
Answered By - Sameer Mansuri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.