I'm working on a mobile application for using Phonegap/Cordova, I'm using the file transfer plugin to upload photos from the photo library.
The iOS build was a success, while the Android build is giving me an error.
I'm not sure what's causing the build to fail and how to prevent that failure.
Here's the build log:
http://freetexthost.com/orbg5lm0en
cordova-plugin-file-transfer has a dependency for cordova-plugin-file 5.0.0, which is not compatible with your cordova-android version, it requires cordova-android 6.3.0 or newer. So you have two options:
Update your cordova-android 6.3.0 or newer (I would recommend 6.4.0)
Downgrade cordova-plugin-file-transfer to 1.6.3 as the dependency for cordova-plugin-file will be to an older version of the plugin that should work with your current platform
To update cordova-android you have to remove and re add it (beware that if you made some manual change on the project you will lose it)
cordova platform rm android
cordova platform add android#6.4.0
To downgrade the plugin you also have to remove it first
cordova plugin rm cordova-plugin-file-transfer
cordova plugin add cordova-plugin-file-transfer#1.6.3
Related
Building an ios application from an existing Meteor package. I have been running the following in order to get the application to become an Xcode project:
meteor build ../example-output --mobile-settings settings-staging.json --server https://example-staging.meteorapp.com:443
I already have a mobile-config.js, which includes all the typical configurations for meteor such as App.info, App.icons, App.launchScreens, App.appendToConfig. In addition, I have the REVERSED_CLIENT_ID included in the file. Everything works fine, until I add any cordova plugins (meteor add plugin cordova: etc.)
App.configurePlugin("cordova-plugin-googleplus", {
REVERSED_CLIENT_ID: "com.googleusercontent.apps.010101010-bexamples123"
});
The application builds into a .xcworkspace but then has issues which I think these cordova plugins will fix. How can I configure/fix the REVERSED_CLIENT_ID and/or config issues and add cordova plugins so that this project can compile to an Xcode .xcworkspace?
Thanks to this Github post, which pointed out that
"This problem exists since 1.2.x. It sometimes happens if a Cordova
package references another Cordova package as a dependency. I had this
problems a lot with the cordova-plugin-compat package which is
referenced by some others."
The solution ended up being to simply remove the cordova build:
rm -rf .meteor/local/cordova-build
I also removed and added the iOS platform again for good measure:
meteor remove-platform ios
meteor add-platform ios
I checked the documentation but didn't find a clear explanation about when to use those commands:
cordova platform add android && cordova run android
cordova prepare android && cordova run android
In the documentations the run command does this:
Run project (including prepare && compile)
run is already running prepare. So, is there any case where I need the option 2? To me it looks like it doesn't make sense if I'm using run after that.
Thank you in advance for your valuable time : )
Adding a platform in Cordova does not run the prepare command which will run hook scripts.
Assuming the android platform is not already added, this will generate the directory platforms/android and populate it with a complete standalone Android project. Cordova plugins that have been installed will also be installed into the Android project. cordova run android will run cordova prepare android followed by cordova build android, then proceed to install and run the application. If the android platform is already added Cordova will throw and error.
This command is redundant, and, assuming the android platform has already been added, will run cordova prepare android twice followed by cordova build android, then install and run that application. If the platform is not added Cordova will throw an error.
Conclusion
It makes little sense to differentiate between the two command sequences you provided as they seldom need to be executed. You usually only add a platform once, and you can just call cordova run android without needing to call cordova prepare android before it unless you intend to use cordova build android manually (potentially as a signed release) followed by using adb or saving/deploying the generated APK without needing to do a full blown run.
Regarding option 1, if you already have one android platform, it will fail due to
"cordova platform add android" command and not "cordova run android"
Regarding option 2, even if there is no android platform,it will work
Tried with cordova version = 10
I'm working on a project with cordova 6.2.0 and framework7 1.6.5.
Now I've to start a new project based on cordova 7.1.0 and framework7 2.0.7.
I know that with version-manager-cordova-software [1] it's possible to run different cordova versions in the same development box, does exist something similar for framework7?
I'm searching for a working setup for both linux and osx.
[1] https://www.npmjs.com/package/version-manager-cordova-software
I solved by myself: framework7 is always contained inside the cordova project, so it is possible to have different version on the same box.
The globally installed package is framework7-cli (https://www.npmjs.com/package/framework7-cli), actually at version 0.2.0, and it seems to work with both f7 v.1 and v.2.
I built an Ionic app a couple years ago with Ionix 1.x and JavaScript. It's been running fine for quite a while, but now it needs to be recompiled to allow for use on iOS 11. My build is now completely broken with the ionic#latest updates.
My question is how do I get the correct version of Ionic installed on my dev machine so that this app can compile? Should I be able to use the latest ionic-cli command with an older version of the Ionic dependencies? I'm not ready to port my application to Ionic 2+ and Angular 2+ and TypeScript.
ionic#latest cli is fine for building an ionic1 project but you will find some compatibility issues with older platforms and plugins. Suggest you start by updating the platform:
cordova platform update ios
For some of the latest iOS 11 issues and in particular, iPhone X screen issues, you may want to try:
cordova platform update ios#4.5.0
For any plugins that are causing problems, you will need to remove them individually and re-add them:
cordova plugin rm cordova-plugin-xxxx --save
cordova plugin add cordova-plugin-xxxx --save
I am trying to create a basic mobile app using steps provided on
this link
Everything worked fine till step 3. But on step 3
$ ionic build ios
is giving error as under
✗ (node:9776) fs: re-evaluating native module sources is not
supported. If you are using the graceful-fs module, please update it
to a more recent version.
Error: xcodebuild was not found. Please install version 6.0.0 or
greater from App Store
I am already using the latest version of node.js ie; 6.2.0. Am I missing anything?
Simply put, you can't compile iOS apps locally using a Windows Machine. You'll either need to compile those apps using a Mac, or a cloud-compiler service, like PhoneGap Build or Ionic Platform.