Reputation: 467
I create ionic 3 project and add file and transfer cordova plugin like this and cant able to run android using this command ionic cordova run android --prod
Installing "cordova-plugin-file-transfer" for android
Failed to install 'cordova-plugin-file-transfer': CordovaError: Version of installed plugin: "[email protected]" does not satisfy dependency plugin requirement "cordova-plugin-file@^5.0.0". Try --force to use installed plugin as dependency.
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:581:33
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Failed to restore plugin "cordova-plugin-file-transfer" from config.xml. You might need to try adding it again. Error: Version of installed plugin: "[email protected]" does not satisfy dependency plugin requirement "cordova-plugin-file@^5.0.0". Try --force to use installed plugin as dependency.
ANDROID_HOME=/Users/reactivespace/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[ERROR] An error occurred while running cordova run android (exit code 1)
Upvotes: 0
Views: 1103
Reputation: 204
Try this:
Download the latest Gradle distribution here.
Then create a new directory C:\Gradle with File Explorer.
Unzip the content inside this folder.
After that, under System Variables select Path, then click Edit. Add an entry for C:\Gradle\gradle-4.4\bin. Click OK to save.
Restart your computer than give it another try.
Hope this steps can help you.
Upvotes: 1