- Failed to fetch platform cordova-android@8.0.0 #803
- Comments
- Sampath-Lokuge commented Aug 8, 2019 •
- Error: Failed to fetch platform cordova-android@^6.2.3 Probably this is either a connection problem, or platform spec is incorrect. #2538
- Comments
- faziltm commented Jul 19, 2017
- janpio commented Jul 21, 2017
- imhoffd commented Jul 21, 2017
- marosca commented Sep 12, 2017
- janpio commented Sep 12, 2017
- janpio commented Sep 12, 2017
- Namatai commented Sep 21, 2017
- f4bio commented Sep 26, 2017 •
- dblazeski commented Sep 27, 2017
- capitalgerald commented Oct 20, 2017
- Failed to fetch platform cordova-android@^8.0.0 — Cannot read property ‘match’ of undefined #835
- Comments
- ctfrancia commented Oct 1, 2019
- Bug Report
- Problem
- What is expected to happen?
- What does actually happen?
- Information
- Command or Code
- Environment, Platform, Device
- Version information
- Checklist
- ctfrancia commented Oct 1, 2019
- Cordova 10 error when adding or removing platform #543
- Comments
- cumpstey commented Nov 25, 2020
- Bug Report
- Problem
- What is expected to happen?
- What does actually happen?
- Information
- Command or Code
- Environment, Platform, Device
- Version information
- Checklist
- breautek commented Nov 25, 2020
- Как исправить ошибки Gradle failed to fetch dependencies и Picked up JAVA_TOOL_OPTIONS?
Failed to fetch platform cordova-android@8.0.0 #803
Comments
Sampath-Lokuge commented Aug 8, 2019 •
Below error shows when I tried to ionic cordova platform add android@8.0.0
Note: I have tried many times.
I have done this:
rm -rf node_modules/
rm -rf platforms/
rm -rf plugins/
Removed package.lock.json and tried npm i But no luck yet. Any clue?
ionic cordova platform add android@8.0.0
cordova.cmd platform add android@8.0.0
Using cordova-fetch for cordova-android@8.0.0
Failed to fetch platform cordova-android@8.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! Windows_NT 10.0.17763
npm ERR! argv «C:\Program Files\nodejs\node.exe» «D:\Clients\ionic4\node_modules\npm\bin\npm-cli.js» «install» «cordova-android@8.0.0» «—production» «—save»
npm ERR! node v12.4.0
npm ERR! npm v2.15.12
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package @ionic-native/core@5.11.0 does not satisfy its siblings’ peerDependencies requirements!
npm ERR! peerinvalid Peer @ionic-native/android-permissions@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/document-viewer@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/file@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/file-opener@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/file-transfer@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/firebase-x@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/geolocation@5.3.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/http@5.3.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/in-app-browser@5.2.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/launch-navigator@5.11.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/network@5.3.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/screen-orientation@5.4.0 wants @ionic-native/core@^5.1.0
npm ERR! peerinvalid Peer @ionic-native/splash-screen@5.0.0 wants @ionic-native/core@5.0.0
npm ERR! peerinvalid Peer @ionic-native/status-bar@5.0.0 wants @ionic-native/core@5.0.0
npm ERR! peerinvalid Peer @ionic-native/vibration@5.7.0 wants @ionic-native/core@^5.1.0
npm ERR! Please include the following file with any support request:
npm ERR! D:\Clients\ionic4\npm-debug.log
[ERROR] An error occurred while running subprocess cordova.
Ionic CLI : 5.1.0 (C:\Users\Sampath\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.2.0
Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
cordova-res : not installed
native-run : 0.2.5
NodeJS : v12.4.0 (C:\Program Files\nodejs\node.exe)
npm : 2.15.12
OS : Windows 10
The text was updated successfully, but these errors were encountered:
Источник
Error: Failed to fetch platform cordova-android@^6.2.3 Probably this is either a connection problem, or platform spec is incorrect. #2538
Comments
faziltm commented Jul 19, 2017
when i am using cordova ionic framework
My cordova version is 6.2.3
Node js version is 6.11.1
My android sdk in C:\Users\user3\AppData\Local\Android\Sdk
I am using android studio my sdk api level is 25.
C:\Users\user3\Desktop\myApp>ionic cordova platform add android
cordova platform add android —save
× Running command — failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova platform add android —save (exit code 1):
The text was updated successfully, but these errors were encountered:
janpio commented Jul 21, 2017
What is you ionic info output?
Run the same command with —verbose at the end.
Leave the ionic off at the beginning and add —debug at the end.
Post both outputs.
imhoffd commented Jul 21, 2017
I’ve never seen this issue locally so I’ve been unable to reproduce the problem.
Please update the issue if you find a solution.
marosca commented Sep 12, 2017
janpio commented Sep 12, 2017
I am under the impression that it happens less when node and npm was installed via nvm or nvm-windows . But I don’t have proof. (But uninstalling node and reinstalling it via nvm or nvm-windows mostly fixes the problem. )
janpio commented Sep 12, 2017
Namatai commented Sep 21, 2017
DELETE the downloaded file cordova-android-6.2.3.tgz or folder npm-304 8-83f48a6f under-
C:\Users**
And do cordova platform add android again. npm will redownload the required file.
You can also download it manually (7.7 MB) from here and place it in the same folder and then run the command.
or delete all the files in the temp folder add the downloaded file in the root folder of
C:\Users**
f4bio commented Sep 26, 2017 •
apparently, npm or node tries to run
«/usr/bin/node» «/my/project/node_modules/.bin/npm» «install» «cordova-android@
6.2.2″ «—save» which fails for some reason.
specifying cordova/ionic directly worked(-around) for me /usr/bin/cordova platform add android
I have no idea about the underlying issue though.
edit: forgot to mention (thanks @dblazeski), tested on macos&arch node8.5.0/npm8.3.0/cordova7.0
dblazeski commented Sep 27, 2017
For me on mac, following f4bio comment, running just cordova platform add android fixed the issue, after that ionic cordova run android worked as expected
capitalgerald commented Oct 20, 2017
Facing the same issue.
Hello.
My greetings to you.
Am Gerald Kibirango an ionic lover and developer.
I thank you for your services on improving ionic time to time and sharing with the community.
Am requesting for tour help.
I created an ionic project, run it using the (ionic serve —lab) and it run well in the browser. Then wanted to and android platform to it after setting the path in the system variable very well with a confirmation of running a command (android) in the cmd and it opened the sdk (However for eclipse).
The run the command for adding android platform as (## ionic platform add android)
and it failed, Then aslo run with (## ionic cordova platform add android) and also failed too.
It displayed the following error:
ERROR Exception: Using cordova-fetch for cordova-android 6.3.0
Error: Failed to fetch platform cordova-android 6.3.0
probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/uURL.
Error: cmd: Command failed woth exit code ENOENT
May you help me.
I will be glad for your response.
Thanks
Источник
Failed to fetch platform cordova-android@^8.0.0 — Cannot read property ‘match’ of undefined #835
Comments
ctfrancia commented Oct 1, 2019
Bug Report
Problem
when running $ cordova platform add android I get the error:
I use yarn and not npm. I know that npm is a dependency of yarn, not sure if this matters or not.
Also I know there have been issues on github regarding this (but that person was having dependency issues) and there was one on SO here but the issue was a version problem, not npm ERR! Cannot read property ‘match’ of undefined
What is expected to happen?
to add the platform @^8.0.0
What does actually happen?
gives the error error mentioned above
Information
Command or Code
$ cordova platform add android
Environment, Platform, Device
Version information
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
The text was updated successfully, but these errors were encountered:
ctfrancia commented Oct 1, 2019
I am an idiot. I still had a package-lock.json AND a yarn.lock file. Deleting the package-lock and node_modules with $ rm -rf node_modules package-lock.json and then running the command $ yarn with a fresh install solved this issue and was able to install correctly.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Cordova 10 error when adding or removing platform #543
Comments
cumpstey commented Nov 25, 2020
Bug Report
Problem
Updating an existing project from Cordova 9 to 10, I get an error when trying to add or remove a platform. Then tried with new Ionic project in clean Node installation, and get the same error.
What is expected to happen?
The Android platform is added to the project.
The Android platform is removed from the project (or a message saying it’s not part of the project).
What does actually happen?
Information
Command or Code
Environment, Platform, Device
Version information
MacOS 10.15.7
Node 12.20.0 and 10.15.3 — same behaviour in both.
Cordova CLI 10.0.0
Ionic CLI 6.12.2
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
The text was updated successfully, but these errors were encountered:
breautek commented Nov 25, 2020
Problem appears to be coming from a sub-dependency.
My first guess is that a sub-dependency didn’t get updated properly on your upgrade. This can happen sometimes when doing upgrades because of how NPM and package locks work.
Can you try the following:
- Delete node_modules folder
- Delete platforms folder — Read the note below
- Delete plugins folder
- Delete package-lock.json file
If you use a global cordova installation, then do: npm uninstall -g cordova && npm install -g cordova
- run npm install
- run cordova platform add android
The above will forcefully remove all your dependencies, platforms and plugins. If you made any custom modifications to your platform(s), it is important you backup those changes.. Then, it will reinstall your dependencies. The platform add command will restore your cordova plugins. The result is everything is installed from scratch.
Источник
Как исправить ошибки Gradle failed to fetch dependencies и Picked up JAVA_TOOL_OPTIONS?
Уже несколько дней мучаюсь из-за одних и тех же ошибок в консоли. В интернете особо инфы по устранению не нашел. У меня 2 ошибки, я их объеденил, и буду очень благодарен, если хоть одна решиться. Я работал над проектом 2 месяца и не хочу, чтобы все мои труды оказались напрасными из-за корявого меня или корявого Юнити. Перед этими ошибками я подключал AdMob и задавал JAVA_HOME в «Переменные среды», чтобы решить ошибку «gradle failed to fetch dependencies».
Ошибка номер 1 возникает когда я нажимаю «Force Resolve» в Asset->ExternalDependencyManager->AndroidResolver->ForceResolve.
Ошибка номер 2 возникает при попытке забилдить проект.
Вот сообщения об ошибках в консоли:
Ошибка 1:
Gradle failed to fetch dependencies.
Gradle failed to fetch dependencies.
Failed to run ‘F:\MyUnity3DProjects\Unity_v_deistvii\Flying Box\Temp\PlayServicesResolverGradle\gradlew.bat —no-daemon -b «F:\MyUnity3DProjects\Unity_v_deistvii\Flying Box\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle» «-PANDROID_HOME=F:/2021.1.12f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK» «-PTARGET_DIR=F:\MyUnity3DProjects\Unity_v_deistvii\Flying Box\Assets\Plugins\Android» «-PMAVEN_REPOS=https://maven.google.com/» «-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:20.2.0» «-PUSE_JETIFIER=1» «-PDATA_BINDING_VERSION=3.6.0″‘
Ошибка 2:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Exception in thread «main» java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
. 5 more
Буду счастлив, если хоть кто-нибудь хоть как-нибудь сможет помочь. Спасибо.
Источник