Issue With Release Build

Hi ,

When I tried to generate a release build for Android, and used the following cli command:

$ cordova build --release android

The build was aborted with the following error:

    ..path\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c ""path\platforms\android\gradlew" cdvBuildRelease -b "path\platforms\android\build.gradle" -Dorg.gradle.daemon=true"

ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
    at ChildProcess.whenDone (C:\Users\ARUP\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

What is going wrong ??

Please help. Let me know how to fix this issue

You can use intel xdk for creating the release build. The procedure for building for different platforms is very easy in intel xdk.

Hi Mithun,

Thanks for your information.

Have you tried exporting an Ionic App to complete .apk file with Intel XDK ?? Would you please share the results ?

i have experienced the same problem as yours ,that is why i used intel xdk to build the app. i have build the apk file with intel xdk and it is working fine. First select the www folder of your ionic app from “import your html5 code base” and add necessary cordova plugins ,icons and splash screen and app related details. Then move over to build tab and select the platform for which you wish to build the app .After the building process completes you can download the .apk file.

Dear Mithun,

Thanks for the info. Will definitely try this out.

Meanwhile could you please tell me if the Splash Screen worked properly on the .apk version from Intel XDK.

Could you please let me know what are the steps to add Splash Screen using Intel XDK.

Thank you in advance.

Best,
Arup.

Hi Arup,
Splash screen is working properly on the .apk version from intel xdk. To add custom splash screen and icons :


Then create splash screen and logo images of size mentioned in that screen and select those images.
After this whenever you build the app, logo and splash screen will change to this images.

Yes … I also tried and it worked

I also tried with Ionic CLI and it worked too .

Have you ever published app for the iOS with XDK ? if yes could you help me guiding ?

Regards,
Arup