0

I created an Android platform with success, but when I run ionic build android I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not create an instance of type org.gradle.invocation.DefaultGradle_Decorated.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
ERROR building one of the platforms: Error code 1 for command: /home/skylek/Ionic/conFusion/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/skylek/Ionic/conFusion/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
You may not have the required environment or OS to build this project
Error: Error code 1 for command: /home/skylek/Ionic/conFusion/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/skylek/Ionic/conFusion/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

Can anyone help me out.

Lee Rooy
  • 141
  • 1
  • 2
  • 11

1 Answers1

0

I had exactly the same problem with an ionic project build with the m-ionic yeoman generator, that was uploaded to the ionic cloud.

It started after my computer crashed with a 'blue screen of death', in the middle of a compilation task

What We did to fix the project was to copy and replacing the gradle and corodova files :

  • .gradle
  • cordova
  • CordovaLib
  • gradle
  • gradlew.bat

from other ionic>platform>android project that I knew was working fine, beacuse we thought the Cordova files might be corrupted, and early in the project we fixed a similar compilation problem that way. It did not fixed the problem. But then removed the ionic cloud configuration files: ionic.project .

And it worked!!

I hope it could help you!