Hi, i just reinstalled my windows, and now iam setting up the developing enviroment for ionic. I installed correct version of java, android studio and sdk, but iam having issue adding platform to my project and running it in emulator or on real device. When i try to add android platform it looks like this :
> cordova platform add android --save
× Running command - failed!
[ERROR] Exception:
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Using cordova-fetch for cordova-android@~6.3.0
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! code 128
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
npm ERR! fatal: 'submodule' appears to be a git command, but we were not
npm ERR! able to execute it. Maybe git-submodule is broken?
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Vartex\AppData\Roaming\npm-cache\_logs\2017-10-14T22_00_38_824Z-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 ...
and when i try to run it on android it looks like this:
C:\programming\ionic\pokus>ionic cordova run android
[INFO] Running app-scripts build: --platform android --target cordova
[00:10:48] build dev started ...
[00:10:48] clean started ...
[00:10:48] clean finished in less than 1 ms
[00:10:48] copy started ...
[00:10:48] deeplinks started ...
[00:10:48] deeplinks finished in 32 ms
[00:10:48] transpile started ...
[00:10:51] transpile finished in 2.47 s
[00:10:51] preprocess started ...
[00:10:51] copy finished in 2.67 s
[00:10:51] preprocess finished in 99 ms
[00:10:51] webpack started ...
[00:10:59] webpack finished in 8.43 s
[00:10:59] sass started ...
[00:11:00] sass finished in 1.05 s
[00:11:00] postprocess started ...
[00:11:00] postprocess finished in 16 ms
[00:11:00] lint started ...
[00:11:00] build dev finished in 12.20 s
> cordova run android
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the project
[00:11:03] lint finished in 2.57 s
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! code 1
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 19: .: git-sh-setup: file not found
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Vartex\AppData\Roaming\npm-cache\_logs\2017-10-14T22_11_16_031Z-debug.log
ANDROID_HOME=C:\Users\Vartex\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_144
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_9wirrgs8fbeatk9gsaabduo3m.run(C:\programming\ionic\pokus\platforms\android\build.gradle:141)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild
UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugNdk
UP-TO-DATE
:CordovaLib:compileLint
UP-TO-DATE
:CordovaLib:copyDebugLint
UP-TO-DATE
:CordovaLib:mergeDebugShaders
UP-TO-DATE
:CordovaLib:compileDebugShaders
UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
UP-TO-DATE
:CordovaLib:packageDebugRenderscript
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:generateDebugResValues
UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources
UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders
UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
UP-TO-DATE
:CordovaLib:bundleDebug
UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib630DebugLibrary
UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl
UP-TO-DATE
:compileDebugRenderscript
UP-TO-DATE
:generateDebugBuildConfig
UP-TO-DATE
:generateDebugResValues
UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources
UP-TO-DATE
:processDebugManifest
UP-TO-DATE
:processDebugResources
UP-TO-DATE
:generateDebugSources UP-TO-DATE
:incrementalDebugJavaCompilationSafeguard
UP-TO-DATE
:compileDebugJavaWithJavac
UP-TO-DATE
:compileDebugNdk
UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders
UP-TO-DATE
:compileDebugShaders
UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
UP-TO-DATE
:transformClassesWithDexForDebug
UP-TO-DATE
:mergeDebugJniLibFolders
UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug
UP-TO-DATE
:processDebugJavaRes
UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
UP-TO-DATE
:validateSigningDebug
:packageDebug
UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE
BUILD SUCCESSFUL
Total time: 1.396 secs
Built the following apk(s):
C:/programming/ionic/pokus/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=C:\Users\Vartex\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_144
No target specified, deploying to device '330029b096e6a3c3'.
Skipping build...
Built the following apk(s):
C:/programming/ionic/pokus/platforms/android/build/outputs/apk/android-debug.apk
Using apk: C:/programming/ionic/pokus/platforms/android/build/outputs/apk/android-debug.apk
Package name: io.ionic.starter
Error: Failed to install apk to device: [ 1%] /data/local/tmp/android-debug.apk
[ 3%] /data/local/tmp/android-debug.apk
[ 4%] /data/local/tmp/android-debug.apk
[ 6%] /data/local/tmp/android-debug.apk
[ 7%] /data/local/tmp/android-debug.apk
[ 9%] /data/local/tmp/android-debug.apk
[ 11%] /data/local/tmp/android-debug.apk
[ 12%] /data/local/tmp/android-debug.apk
[ 14%] /data/local/tmp/android-debug.apk
[ 15%] /data/local/tmp/android-debug.apk
[ 17%] /data/local/tmp/android-debug.apk
[ 18%] /data/local/tmp/android-debug.apk
[ 20%] /data/local/tmp/android-debug.apk
[ 22%] /data/local/tmp/android-debug.apk
[ 23%] /data/local/tmp/android-debug.apk
[ 25%] /data/local/tmp/android-debug.apk
[ 26%] /data/local/tmp/android-debug.apk
[ 28%] /data/local/tmp/android-debug.apk
[ 30%] /data/local/tmp/android-debug.apk
[ 31%] /data/local/tmp/android-debug.apk
[ 33%] /data/local/tmp/android-debug.apk
[ 34%] /data/local/tmp/android-debug.apk
[ 36%] /data/local/tmp/android-debug.apk
[ 37%] /data/local/tmp/android-debug.apk
[ 39%] /data/local/tmp/android-debug.apk
[ 41%] /data/local/tmp/android-debug.apk
[ 42%] /data/local/tmp/android-debug.apk
[ 44%] /data/local/tmp/android-debug.apk
[ 45%] /data/local/tmp/android-debug.apk
[ 47%] /data/local/tmp/android-debug.apk
[ 48%] /data/local/tmp/android-debug.apk
[ 50%] /data/local/tmp/android-debug.apk
[ 52%] /data/local/tmp/android-debug.apk
[ 53%] /data/local/tmp/android-debug.apk
[ 55%] /data/local/tmp/android-debug.apk
[ 56%] /data/local/tmp/android-debug.apk
[ 58%] /data/local/tmp/android-debug.apk
[ 60%] /data/local/tmp/android-debug.apk
[ 61%] /data/local/tmp/android-debug.apk
[ 63%] /data/local/tmp/android-debug.apk
[ 64%] /data/local/tmp/android-debug.apk
[ 66%] /data/local/tmp/android-debug.apk
[ 67%] /data/local/tmp/android-debug.apk
[ 69%] /data/local/tmp/android-debug.apk
[ 71%] /data/local/tmp/android-debug.apk
[ 72%] /data/local/tmp/android-debug.apk
[ 74%] /data/local/tmp/android-debug.apk
[ 75%] /data/local/tmp/android-debug.apk
[ 77%] /data/local/tmp/android-debug.apk
[ 78%] /data/local/tmp/android-debug.apk
[ 80%] /data/local/tmp/android-debug.apk
[ 82%] /data/local/tmp/android-debug.apk
[ 83%] /data/local/tmp/android-debug.apk
[ 85%] /data/local/tmp/android-debug.apk
[ 86%] /data/local/tmp/android-debug.apk
[ 88%] /data/local/tmp/android-debug.apk
[ 90%] /data/local/tmp/android-debug.apk
[ 91%] /data/local/tmp/android-debug.apk
[ 93%] /data/local/tmp/android-debug.apk
[ 94%] /data/local/tmp/android-debug.apk
[ 96%] /data/local/tmp/android-debug.apk
[ 97%] /data/local/tmp/android-debug.apk
[ 99%] /data/local/tmp/android-debug.apk
[100%] /data/local/tmp/android-debug.apk
C:/programming/ionic/pokus/platforms/android/build/outputs/apk/android-debug.apk: 1 file pushed. 4.2 MB/s (4150483 bytes in 0.934s)
pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
[ERROR] An error occurred while running cordova run android (exit code 1).
any ideas how to fix it? Iam getting a little desperate