简体   繁体   English

我无法在ionic中添加android平台

[英]I'm unable to add android platform in ionic

From today i am facing a problem in ionic to add android platform. 从今天开始,我在添加android平台时面临离子问题。

when i run ionic cordova platform add android i found following Error: Please help me. 当我运行离子Cordova平台添加android时,我发现以下错误:请帮助我。

C:\\Users\\kamal\\Desktop\\desktop>ionic cordova platform add android C:\\ Users \\ kamal \\ Desktop \\ desktop> ionic cordova平台添加android

[INFO] Enabling Cordova integration. [INFO]启用Cordova集成。

ionic config set integrations.cordova {} --json --force [OK] integrations.cordova set to {} in .\\ionic.config.json! ionic配置集Integrations.cordova {} --json --force [OK] Integrations.cordova在。\\ ionic.config.json中设置为{}! cordova platform add android --save × Running command - failed! cordova平台添加android --save×运行命令-失败! [ERROR] Exception: Using cordova-fetch for cordova-android@~6.3.0 [错误]异常:对cordova-android@~6.3.0使用cordova-fetch

    Adding android project...
    Creating Cordova project for the Android platform:
            Path: platforms\android
            Package: io.ionic.starter
            Name: MyApp
            Activity: MainActivity
            Android target: android-26
    Subproject Path: CordovaLib
    Android project created with cordova-android@6.3.0
    Discovered plugin "ionic-plugin-keyboard" in config.xml. Adding it to the project
    Installing "ionic-plugin-keyboard" for android
    Adding ionic-plugin-keyboard to package.json
    Saved plugin info for "ionic-plugin-keyboard" to config.xml
    Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
    Installing "cordova-plugin-whitelist" for android

                    This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a
    previous platform version, you do *not* need this plugin since the whitelist will be built in.

    Adding cordova-plugin-whitelist to package.json
    Saved plugin info for "cordova-plugin-whitelist" to config.xml
    Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the project
    Failed to restore plugin "cordova-plugin-statusbar" from config.xml. You might need to try adding it again.
    Error: Failed to fetch plugin https://github.com/apache/cordova-plugin-statusbar.git via registry.
    Probably this is either a connection problem, or plugin spec is incorrect.
    Check your connection and plugin name/version/URL.
    Error: cmd: Command failed with exit code 1 Error output:
    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:
    Cloning into
    'C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892'...
    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:
    git-upload-pack
    'C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92':
    git-upload-pack: command not found
    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:
    fatal: Could not read from remote repository.
    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:

    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:
    Please make sure you have the correct access rights
    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:
    and the repository exists.
    npm ERR! git clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892:

    npm ERR! Windows_NT 10.0.10240
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
    Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
    "https://github.com/apache/cordova-plugin-statusbar.git" "--production" "--save"
    npm ERR! node v6.11.4
    npm ERR! npm  v3.10.10
    npm ERR! code 128

    npm ERR! Command failed: git -c core.longpaths=true clone
    C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92
    C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892
    npm ERR! Cloning into
    'C:\Users\kamal\AppData\Local\Temp\npm-5316-596ddc1c\git-cache-f1f0edfd\08127bf674bcfc5a161466a4c19e8fd21f726892'...
    npm ERR! git-upload-pack
    'C:\Users\kamal\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-apache-cordova-plugin-statusbar-git-c66a3d92':
    git-upload-pack: command not found
    npm ERR! fatal: Could not read from remote repository.
    npm ERR!
    npm ERR! Please make sure you have the correct access rights
    npm ERR! and the repository exists.
    npm ERR!
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR!     <https://github.com/npm/npm/issues>

    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\Users\kamal\Desktop\desktop\npm-debug.log
    Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project
    Installing "cordova-plugin-device" for android
    Adding cordova-plugin-device to package.json
    Saved plugin info for "cordova-plugin-device" to config.xml
    Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project
    Installing "cordova-plugin-splashscreen" for android
    Adding cordova-plugin-splashscreen to package.json
    Saved plugin info for "cordova-plugin-splashscreen" to config.xml
    Discovered plugin "cordova-plugin-ionic-webview" in config.xml. Adding it to the project
    Installing "cordova-plugin-ionic-webview" for android
    Adding cordova-plugin-ionic-webview to package.json
    Saved plugin info for "cordova-plugin-ionic-webview" to config.xml
    --save flag or autosave detected
    Saving android@~6.3.0 into config.xml file ...

My ionic info 我的离子信息

@ionic/cli-utils  : 1.13.0
ionic (Ionic CLI) : 3.13.0

global packages: 全局软件包:

cordova (Cordova CLI) : 7.1.0

local packages: 本地套餐:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.7.1

System: 系统:

Android SDK Tools : 26.1.1
Node              : v6.11.4
npm               : 3.10.10
OS                : Windows 10

Misc: 其他:

backend : pro

尝试安装node.js的6.11.4 LTS版本(标记为大多数用户推荐)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM