Не удалось добавить платформу android в проект ioni c - PullRequest
0 голосов
/ 28 января 2020

IM ПЫТАЕТСЯ СОЗДАТЬ APK, И Я ПОЛУЧИЛ ЭТУ ОШИБКУ

Discovered saved plugin "im.ltdev.cordova.UserAgent". Adding it to the project
Failed to restore plugin "im.ltdev.cordova.UserAgent" from config.xml. You might need to try adding it again. Error: Error: npm: Command failed with exit code 1 Error output:
npm ERR! code E404
npm ERR! 404 Not found : im.ltdev.cordova.UserAgent
npm ERR! 404
npm ERR! 404  'im.ltdev.cordova.UserAgent' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404  1. name can no longer contain capital letters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Desarrollo\AppData\Roaming\npm-cache\_logs\2020-01-28T17_27_27_131Z-debug.log
Discovered saved plugin "cordova-plugin-firebase". Adding it to the project
Failed to restore plugin "cordova-plugin-firebase" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/dpa99c/cordova-plugin-firebase.git#GH-1057-April-05-android-build-issue via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t https://github.com/dpa99c/cordova-plugin-firebase.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Desarrollo\AppData\Roaming\npm-cache\_logs\2020-01-28T17_27_31_601Z-debug.log
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to C:\Users\Desarrollo\Desktop\lugus-3-0\platforms\android\app\build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to C:\Users\Desarrollo\Desktop\lugus-3-0\platforms\android\cordova-android-support-gradle-release\SanDiego-cordova-android-support-gradle-release.gradle
cordova-plugin-androidx: Updated gradle.properties to enable AndroidX
cordova-plugin-androidx-adapter: Processed 18 Java source files in 450ms
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd platform add android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

ЭТО МОЯ ИОНИ C ИНФО

Иони c:

Иони c CLI: 5.4.15 ( C: \ Users \ Desarrollo \ AppData \ Roaming \ npm \ node_modules \ ioni c) Ioni c Framework: @ ionic / angular 4.0.0-beta.17 @ angular -devkit / build- angular: 0.803.23 @ angular -девкит / схема: 7.0.7 @ angular / cli: 7.0.7 @ ionic / angular -толкит: 1.2.0

Cordova: Cordova CLI: не установлено Cordova Платформы: android 8.1.0 Плагины Cordova: cordova-plugin-ioni c -keyboard 2.2.0, cordova-plugin-ioni c -webview 2.5.2, (и 10 других плагинов)

Утилита: cordova-res: 0.9.0, собственный запуск: не установлен

Система: NodeJS: v11.1.0 (C: \ Program Files \ nodejs \ node.exe) npm: 6.4.1 ОС: Windows 10

1 Ответ

0 голосов
/ 28 января 2020

Кажется, вы неправильно указали имя узла-модуля в пакете. json.

Пожалуйста, обновите package.json, чтобы использовать cordova-plugin-agent, очистите каталог node_modules и NPM кэшируйте и установите его снова.

Надеюсь, это поможет.

Также, пожалуйста, обратитесь к этой проблеме здесь, на github , которая имеет ту же информацию:

...