Build Failed When Using Cordova : Exit Code 1

Hi Everyone,

Sorry, I tried exporting my game using Cordova from the instructions on

https://wiki.gdevelop.io/gdevelop5/publishing/android_and_ios_with_cordova

I did the following as instructed on my mac; however, I have the same issues on Win10.

Any help is very much appreciated.

  1. Changed directory to location of my packaged game from Gdevelop.

  2. From Terminal, ran
    cordova platform add android

(Success, had no issues, except some warning message about cordova recommending “android.userAndroidX” and “android.enableJetifier” of the value being “true” to be changed to “false”.

  1. cordova build android

Text Version
MacPro5:Version_12242021 macpro5$ cordova build android
[Gradle Properties] Detected Gradle property “android.useAndroidX” with the value of “true”, Cordova’s recommended value is “false”
[Gradle Properties] Detected Gradle property “android.enableJetifier” with the value of “true”, Cordova’s recommended value is “false”
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: /Users/macpro5/Library/Android/sdk
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    Gradle could not start your build.

Could not create service of type ChecksumService using BuildSessionScopeServices.createChecksumService().
Timeout waiting to lock checksums cache (/Volumes/2TB Prod_2/Wittee Game Apps/1 ABA App Social/Exported_Game_App/HTML/Version_12242021/platforms/android/.gradle/checksums). It is currently in use by another Gradle instance.
Owner PID: unknown
Our PID: 1703
Owner Operation: unknown
Our operation:
Lock file: /Volumes/2TB Prod_2/Wittee Game Apps/1 ABA App Social/Exported_Game_App/HTML/Version_12242021/platforms/android/.gradle/checksums/checksums.lock

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 7s
Command failed with exit code 1: /usr/local/Cellar/gradle/7.0/bin/gradle -p /Volumes/2TB Prod_2/Wittee Game Apps/1 ABA App Social/Exported_Game_App/HTML/Version_12242021/platforms/android wrapper -b /Volumes/2TB Prod_2/Wittee Game Apps/1 ABA App Social/Exported_Game_App/HTML/Version_12242021/platforms/android/wrapper.gradle
MacPro5:Version_12242021 macpro5$
[Restored Dec 25, 2021 at 11:31:38 PM]
Last login: Sat Dec 25 23:14:25 on ttys001
Restored session: Sat Dec 25 23:31:16 PST 2021
-bash: export: Prod_2/Game': not a valid identifier -bash: export: Dev/Mac/cocos2d-x-3.10/tools/cocos2d-console/bin’: not a valid identifier
-bash: export: Prod_2/Game': not a valid identifier -bash: export: Dev/Mac’: not a valid identifier
-bash: export: Prod_2/Game': not a valid identifier -bash: export: Dev/Mac/cocos2d-x-3.10/templates’: not a valid identifier
MacPro5:Version_12242021 macpro5$
[Restored Dec 26, 2021 at 10:00:04 AM]
Last login: Sat Dec 25 23:31:38 on ttys000
Restored session: Sat Dec 25 23:37:44 PST 2021
-bash: export: Prod_2/Game': not a valid identifier -bash: export: Dev/Mac/cocos2d-x-3.10/tools/cocos2d-console/bin’: not a valid identifier
-bash: export: Prod_2/Game': not a valid identifier -bash: export: Dev/Mac’: not a valid identifier
-bash: export: Prod_2/Game': not a valid identifier -bash: export: Dev/Mac/cocos2d-x-3.10/templates’: not a valid identifier
MacPro5:Version_12242021 macpro5$

Try restarting your computer. Make sure you have nothing like android studio that might be using build tools running in parallel.

Thank you very much. This had the same issue; however, I got curious and exported my game directly to a secondary drive and not my external USB drive.

Then, wallah! It worked!! I’ve been stuck at this for about 2 months and was going crazy; however, I’m so stoked this works now.

Thank you very much for your time. It’s greatly appreciated and my apologies for wasting anyone’s time including yours too.

Merry Christmas!

1 Like