Ionic pro package failed after successful deploy


#1

My app was building fine until last week. Resumed work on it this week and whenever i push the app to ionic pro and build, it builds fine, but when i package, the build fails. Here is the last part of the log, where the problem shows:

Download https://jcenter.bintray.com/nekohtml/nekohtml/1.9.6.2/nekohtml-1.9.6.2.jar

FAILURE: Build failed with an exception.

BUILD FAILED in 2m 6s
(node:1) UnhandledPromiseRejectionWarning: Error: /usr/src/app/platforms/android/gradlew: Command >failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

BUILD FAILED in 2m 6s
at ChildProcess.whenDone (/usr/src/app/platforms/android/cordova/node_modules/cordova->common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by >throwing inside of an async function without a catch block, or by rejecting a promise which was not handled >with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, >promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
$ cordova build android success
Running after script…
$ run “clean-up”
Running Stage clean-up for Job: 6258383

I do not know how do i change the intellij version.


#2

I am having the exact same problem, seems to have just stop to work this morning. Was building fine last night, have you managed to get it up and running?


#3

Nope. Its still the same. Just wont work.


#4

I’m having a similar issue, it looks like some jar files are missing from the jcenter repo. I was able to build a few days ago, it suddenly stopped working


#5

Same here. Problems starts few hours ago


#6

I have the same issue. Looks like an issue Ionic needs to fix. I had the same issue on my local dev machine. I fixed it by edditing \platforms\android\build.gradle file (line 39) to this:

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        mavenCentral()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}

Moving jcenter down, and adding mavenCentral. That is not something that we can change in the cloud builds i think.


#7

Thank you @netexpo. Still doesn’t work for us.


#8

For me neither, on my local machine it now works (had the same issue). Hope that it will be fixed soon.


#9

Thank you @netexpo. But the error persists.

It was my first build for this project and i’m out of ideas for now


#10

Thank you @netexpo, unfortunately also not working for me unless I had my process steps wrong. What I did was updated the build.gradle file directly under platforms/android with the said repositories. After updating I tried building with cordova build --debug android but still gave me the error. Is there any other step I need to follow/run after changing the repositories?


#11

Same error here! I sent today an email to ionic developers with this error.
Meanwhile, does anyone know how to repair it?


#12

Check Android build, likely the same issue and has (somewhat) more info/options that maybe can help. The only thing i did extra was updating Android Studio too, but i don’t think that has something to do with it and will fix nothing on the Ionic packaging side of building.


#13

Same here. I have the same issue since this morning.


#14

Guys, i was able to build!

Edit “\platforms\android\CordovaLib\build.gradle” instead “\platforms\android\build.gradle” and put jcenter() after maven…

repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
}

Could not find support-v4.aar (com.android.support:support-v4:26.1.0)
#15

That was it, thank you lukas


Error building android, any idea?
#16

Was able to build as well but did the following:

  1. Closed Android Studio also had VS closed.
  2. Removed the Android platform.
  3. Add the Android platform again.
  4. Before running any builds open up the \platforms\android\build.gradle and edit the repositories like @netexpo recommended, and save the file.
   repositories {
        mavenCentral()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
  1. Open up your project in Android Studio waited for studio do sync the gradle file, it downloaded a couple of items. After the sync process was completed the file had been build.

#17

Thanks LucasMds it work!


#18

Thanks @lucasmds . It worked.


#19

Brilliant @lucasmds. Worked like charm. You saved my day. :pray:


#20

Any solution when we use a custom CI. Because platforms folder was create for each build.