I installed call number plugin on ionic. In fact it created a directory to ionic-native but I have the error "console.warn: Ionic Native: tried calling CallNumber.callNumber, but the CallNumber plugin is not installed.".
How I can fix this error?
Please be sure that you installed the cordova plugin:
ionic cordova plugin add call-number
Maybe you can try deleting the platforms and adding them again.
ionic cordova platform remove ios
ionic cordova platform remove android
ionic cordova platform add ios
ionic cordova platform add android
Related
In few mobiles,my ionic app shows white screen only, when apk build with --prod mode. But the same apk works on other mobiles. If i build without --prod , it is working in all mobiles. i don't have any idea. Please help me out. Thanks in advance.
If you are using android platform version 10.0.0 or higher. Then you have to remove whitelist plugin, if it is installed in your project.
It doesn't work with android 10 or later. This is the reason it shows white screen after opening installed application.
cordova plugin rm cordova-plugin-whitelist
cordova prepare OR ionic cordova prepare
if prepare doesn't work try to remove platform and add again.
ionic cordova platform rm android
ionic cordova platform add android
Thanks, Hope it helps you.
Error when building for the device
I am getting an error when I try to build for the device(ionic cordova run android --device). For some reason it is not creating platforms/android/app/build/outputs/apk/debug/app-debug/apk. I have tried removing and adding android different versions. Also, I have tried ionic cordova run android --no-native-run and it loads but with a blank screen.
I found 2 solutions, so if you have a problem with running the device feature:
Update CLI!
Remove Android
ionic cordova platform rm android
Add android#6 and run ionic cordova run android --no-native-run
OR
3.add the latest android#latest and run ionic cordova run android.
Those two worked for me, depending on the version of your projects!
I have an issue only with android build, when I running on emulator or device android I get the error that ALL plugins are not installed, on ios emulator or device I dont have this issue
Any idea?
Thanks
Evripides
Maybe your plugins are not prepared.
Try cordova prepare then npm install and finally ionic cordova platform add <your_platform>
Your problem is specific with android so your platform should be android
remove node module and package.json.lock file manually
remove android platform using command ionic cordova platform rm android
npm i
ionic cordova platform add android
and install all plugins like below
ionic cordova plugin add cordova-plugin-file
npm install #ionic-native/file --save
Finaly I found the error on 1 plugin in-app-purchase, I removed it and reinstall it and now all are fine
Thank you all
sometimes android build fails dependencies mismatch so and re run fresh.
delete node_module
npm i
ionic cordova rm android
ionic cordova add platform android
I have an Ionic version 1 project and install Ionic version 4 on my linux machine.
When trying to build an Android using ionic build android e get this error message:
Unable to load PlatformApi from platform. Error: Cannot find module '/home/myuser/ionic/myapp/platforms/android/cordova/Api.js'
How can i solve this problem?
this issue in latest ionic and cordova versions. try to Run following steps
ionic cordova platform rm browser/android/ios
ionic cordova run --emulator
After building and running android app it closes.
Viewing Eclipse logcat it shows a class not found exception com.ionic.keyboard.IonicKeyboard
I'm new with Ionic and I don't know how to make it work. Thanks in advance
I had the same problems.
In my case the plugin was already installed, so I had to remove and add it again:
Try this in your app-folder:
cordova plugin remove com.ionic.keyboard
and
cordova plugin add com.ionic.keyboard
npm changed plugin names. Now it should be
cordova plugin add ionic-plugin-keyboard
Try this in your app-folder:
cordova plugin remove ionic-plugin-keyboard
and
cordova plugin add ionic-plugin-keyboard
Seems that plugin not installed?
Try in cmd:
cordova plugin add com.ionic.keyboard