[英]Failed to fetch platform cordova-android@^8.0.0
I am newbie to cordova i have installed it properly.我是cordova的新手,我已经正确安装了它。 right now I am facing issue in adding platform for android.现在我在为 android 添加平台时面临问题。 This is my cordova version这是我的科尔多瓦版本
9.0.0 (cordova-lib@9.0.1) 9.0.0 (cordova-lib@9.0.1)
This is the error i am getting , can anyone help me to solve this这是我遇到的错误,谁能帮我解决这个问题
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: npm: Command failed with exit code ENOENT
Platforms平台
Available platforms:
android ^8.0.0
browser ^6.0.0
electron ^1.0.0
ios ^5.0.0
osx ^5.0.0
windows ^7.0.0
08-08-2019 08-08-2019
Ionic 4离子 4
I have a dev environment issue.我有一个开发环境问题。 I didn't use the latest Ionic CLI and Cordova CLI.我没有使用最新的 Ionic CLI 和 Cordova CLI。 After I updated those then no issues and I was able to build the APK.在我更新这些之后就没有问题了,我能够构建 APK。
$ ionic info
Ionic:
Ionic CLI : 5.2.4 (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:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 20 other plugins)
Utility:
cordova-res : not installed
native-run : 0.2.5
System:
NodeJS : v12.4.0 (C:\Program Files\nodejs\node.exe)
npm : 2.15.12
OS : Windows 10
You should check what version of android is provided by cordova.您应该检查cordova提供的android版本。 You can check it in C:/Users/%USER%/.cordova/lib/npm-cache/cordova-android
您可以在C:/Users/%USER%/.cordova/lib/npm-cache/cordova-android
Then, you install the Android platform version provided.然后,安装提供的 Android 平台版本。 For me it was @5.1.0
which was in my cordova-android folder.对我来说,它是@5.1.0
,它在我的cordova-android 文件夹中。 So I used the cmd line following:所以我使用了以下 cmd 行:
cordova platform add android@5.1.0
which should be a different version for you cordova platform add android@5.1.0
这应该是一个不同的版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.