Cant add platform to ionic project


#1

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 :smiley:


#2

What does your package.json and config.xml look like?
What is you ionic info output?


#3

my ionic info

cli packages: (C:\Users\Vartex\AppData\Roaming\npm\node_modules)

    @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  : android 6.3.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    Node : v6.11.4
    npm  : 5.5.1
    OS   : Windows 10

Misc:

    backend : pro

my config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>MyApp</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
    <plugin name="cordova-plugin-whitelist" spec="1.3.1" />
    <plugin name="cordova-plugin-statusbar" spec="https://github.com/apache/cordova-plugin-statusbar.git" />
    <plugin name="cordova-plugin-device" spec="1.1.4" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
    <engine name="android" spec="~6.3.0" />
</widget>

and my package.json

{
  "name": "pokus",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/core": "4.3.0",
    "@ionic-native/splash-screen": "4.3.0",
    "@ionic-native/status-bar": "4.3.0",
    "@ionic/storage": "2.0.1",
    "cordova-android": "6.3.0",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-ionic-webview": "^1.1.15",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "https://github.com/apache/cordova-plugin-statusbar.git",
    "cordova-plugin-whitelist": "^1.3.1",
    "ionic-angular": "3.7.1",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.0.0",
    "typescript": "2.3.4"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "ionic-plugin-keyboard": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {}
    },
    "platforms": [
      "android"
    ]
  }
}

#4

Replace the Github URL for the statusbar plugin with 2.2.3 in both files and try again.


#5

ill try… but where did it come from? i didnt do any modifications in these files


#6

And it didnt help :frowning: i removed andoid platform and install it again, adding platform was now ok, but when i try to run it, error again

C:\programming\ionic\pokus>ionic cordova run android
[INFO] Running app-scripts build: --platform android --target cordova

[01:29:32]  build dev started ...
[01:29:32]  clean started ...
[01:29:32]  clean finished in 11 ms
[01:29:32]  copy started ...
[01:29:32]  deeplinks started ...
[01:29:32]  deeplinks finished in 24 ms
[01:29:32]  transpile started ...
[01:29:34]  transpile finished in 2.62 s
[01:29:34]  preprocess started ...
[01:29:34]  copy finished in 2.78 s
[01:29:34]  preprocess finished in 99 ms
[01:29:34]  webpack started ...
[01:29:43]  webpack finished in 8.69 s
[01:29:43]  sass started ...
[01:29:44]  sass finished in 1.11 s
[01:29:44]  postprocess started ...
[01:29:44]  postprocess finished in 8 ms
[01:29:44]  lint started ...
[01:29:44]  build dev finished in 12.65 s
> cordova run android
ANDROID_HOME=C:\Users\Vartex\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_144
[01:29:47]  lint finished in 2.71 s
:wrapper


BUILD SUCCESSFUL

Total time: 1.023 secs
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

:CordovaLib:compileDebugNdk

UP-TO-DATE
:CordovaLib:compileLint

:CordovaLib:copyDebugLint

UP-TO-DATE
:CordovaLib:mergeDebugShaders

:CordovaLib:compileDebugShaders

:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets

:CordovaLib:mergeDebugProguardFiles

:CordovaLib:packageDebugRenderscript
 UP-TO-DATE
:CordovaLib:compileDebugRenderscript

:CordovaLib:generateDebugResValues

:CordovaLib:generateDebugResources

:CordovaLib:packageDebugResources

:CordovaLib:processDebugManifest

:CordovaLib:generateDebugBuildConfig

:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard

:CordovaLib:compileDebugJavaWithJavac

:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes

UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

:CordovaLib:mergeDebugJniLibFolders

:CordovaLib:transformNative_libsWithMergeJniLibsForDebug

:CordovaLib:transformNative_libsWithSyncJniLibsForDebug

:CordovaLib:bundleDebug

:prepareOrgApacheCordovaCordovaLib630DebugLibrary

:prepareDebugDependencies
:compileDebugAidl

:compileDebugRenderscript

:generateDebugBuildConfig

:generateDebugResValues

:generateDebugResources
:mergeDebugResources

:processDebugManifest

:processDebugResources

:generateDebugSources
:incrementalDebugJavaCompilationSafeguard

:compileDebugJavaWithJavac

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:compileDebugNdk
 UP-TO-DATE

:compileDebugSources
:mergeDebugShaders

:compileDebugShaders

:generateDebugAssets
:mergeDebugAssets

:transformClassesWithDexForDebug

:mergeDebugJniLibFolders

:transformNative_libsWithMergeJniLibsForDebug

:processDebugJavaRes
 UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
:validateSigningDebug
:packageDebug

:assembleDebug
:cdvBuildDebug

BUILD SUCCESSFUL

Total time: 4.975 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
[ 29%] /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
[ 59%] /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
[ 70%] /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
[ 89%] /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.1 MB/s (4153710 bytes in 0.966s)
        pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

[ERROR] An error occurred while running cordova run android (exit code 1).

#7

The project template seems to be strange right now, causing problems on your system.

Yeah, but that is a different error: You seem to already have a testing app on your device. Uninstall it and it should work.


#8

Yea, i even try to create new project, and in config.xml it creates that github url for the statusbar plugin. So this is some bug in ionic? It didnt do this before.

It works now, great :slight_smile: Thx for your help and time :slight_smile: I really appreciate it :slight_smile:


#9

Yes here: https://github.com/ionic-team/ionic2-app-base/blob/master/config.xml#L86
You can create a bug report here: https://github.com/ionic-team/ionic2-app-base/issues