Ionic build failed on Ionic Pro - ionic-framework

I got an issue building with Ionic pro
it return
Failed to install 'cordova-plugin-ionic': CordovaError: Version of
installed plugin: "cordova-plugin-splashscreen#5.0.1" does not satisfy
dependency plugin requirement "cordova-plugin-splashscreen#^4.0.0".
Try --force to use installed plugin as dependency
Why that? my cordova-plugin-splashscreen#^4.0.0 is already above required version?

Related

I am having this error in flutter while using google map through dependency map_view kindly help me

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':map_view' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.50
Your gradle plugin version that is supported in your project is 1.3.10 and higher, the plugin you are trying to install is using gradle 1.2.50 there for not supported. I suggest you find another plugin since the only map view plugin i found states that is discontinued. I suggest when you pick a plugin to use to check how often it get updated and when the last update happent.

Ionic 3 Native Plugin Social Sharing Error: Plugin not installed

I’m using an Ionic 3 app, trying to get social sharing working.
I followed the steps to install the Ionic Native Social Sharing plugin from: https://ionicframework.com/docs/v3/native/social-sharing/
Ran:
$ ionic cordova plugin add cordova-plugin-x-socialsharing
$ npm install --save #ionic-native/social-sharing#4
Imported the plugin (version 4.x.x) via my app module and added SocialSharing to the providers array.
Imported the plugin via my app.component using:
import { SocialSharing } from '#ionic-native/social-sharing';
Added to the constructor:
private socialSharing: SocialSharing
This share function, also in app.component is triggered via a button in the html (side menu):
async share() {
try {
// Pop the native social sharing sheet, allowing the user to choose how to share the app.
await this.socialSharing.share(this.shareMessage, this.shareSubject, this.shareFile, this.getShareUrl());
this.toast.show('Thanks for sharing!', 3000);
}
catch(err) {
console.error(err);
alert(err);
}
}
I’m using platforms: ios, android and browser.
When I call the method from a build on a real device I get the error:
"Plugin is not installed"
Tried:
Checking logs for installation errors. None seen.
Reinstalled plugin.
Checked plugin present using $ionic cordova plugin list. cordova-plugin-x-socialsharing 5.4.7 “SocialSharing” is present.
Removed and added all platforms again.
Wrapped the share method inside a platform.ready().
Nothing seems to be working. I cannot get the app to recognise the plugin is installed!
PLEASE HELP! :slight_smile: What can I try next?
Thanks
$ionic info:
Ionic:
Ionic CLI : 5.2.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.5
#ionic/app-scripts : 3.2.2
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.0.0, browser 6.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic 5.4.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.5.1, (and 13 other plugins)
Utility:
cordova-res : 0.4.0 (update available: 0.6.0)
native-run : not installed
System:
ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v11.2.0 (/usr/local/Cellar/node/11.2.0/bin/node)
npm : 6.9.2
OS : macOS Mojave
Xcode : Xcode 10.2 Build version 10E125
So according to your information your current installed plugin is version 5.4.7, to make plugins work with Ionic 3 you need to ensure you have installed 4.* version of the plugin.
Seems like you are using the right command for the install (adding #4 after the plugin install command).
Can you try uninstall the plugin and then attempt to reinstall and note which version its installing. You may have to try and install 4.* version:
npm install --save #ionic-native/social-sharing#4.12.0
I got an issue with cordova-plugin-x-socialsharing in Ionic3 and main issue was couldn't install cordova-plugin-x-socialsharing plugin properly(error: can't find plugin.xml for es6-promise-plugin).
Steps to fix:
Installed es6-promise-plugin : ionic cordova plugin add https://github.com/vstirbu/PromisesPlugin
Installed cordova-plugin-x-socialsharing : ionic cordova plugin add cordova-plugin-x-socialsharing
npm install --save #ionic-native/social-sharing#4

Ionic plugins not installed

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

Fail to build android Ionic version 1

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

if i update cordova to a newer version is it necessary to update ionic and all other plugins? how does the changes effect?

I have updated cordova and all other plugins. When I tried generating apk, its showing
"doesnot have required environment or OS to install"
I am not able figure out where the problem is.
this is version info of my app..
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.0.0
Ionic CLI Version: 1.7.7
Ionic App Lib Version: 0.6.3
OS: Windows 7
Node Version: v0.12.7
Did you tried removing Android platform?
ionic platform remove android
and then add it again:
ionic platform add android
or maybe this can be useful:
Cordova / Ionic build error (sometimes): don't have required environment