Native build failed gradlew failed with return code: 1

0
Mendix 10.5.0 Build Native App 1.0.129 Gradle 7.5.1 JAVA_HOME in AppCenter JAVA_HOME_11_X64   I build a native application for android, but i keep getting this error. I was able to build the app a few weeks ago. Please help.   A problem occurred evaluating settings 'nativeTemplate'. Could not read script '/Users/runner/work/1/s/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' as it does not exist.   2024-02-05T07:23:21.3998970Z ...................................................................................................................2024-02-05T07:23:23.8007910Z 2024-02-05T07:23:23.8009720Z Welcome to Gradle 7.5.1!2024-02-05T07:23:23.8010170Z 2024-02-05T07:23:23.8010880Z Here are the highlights of this release:2024-02-05T07:23:23.8011340Z  - Support for Java 182024-02-05T07:23:23.8011600Z  - Support for building with Groovy 42024-02-05T07:23:23.8011860Z  - Much more responsive continuous builds2024-02-05T07:23:23.8012130Z  - Improved diagnostics for dependency resolution2024-02-05T07:23:23.8012230Z 2024-02-05T07:23:23.8012520Z For more details see https://docs.gradle.org/7.5.1/release-notes.html2024-02-05T07:23:23.8012610Z 2024-02-05T07:23:24.4190420Z Starting a Gradle Daemon (subsequent builds will be faster)2024-02-05T07:23:26.7570700Z Configuration on demand is an incubating feature.2024-02-05T07:23:33.1673490Z Gradle 7.5.12024-02-05T07:23:33.4624390Z 2024-02-05T07:23:33.4625550Z FAILURE: Build failed with an exception.2024-02-05T07:23:33.4626000Z 2024-02-05T07:23:33.4626450Z * Where:2024-02-05T07:23:33.4627250Z Settings file '/Users/runner/work/1/s/android/settings.gradle' line: 22024-02-05T07:23:33.4627660Z 2024-02-05T07:23:33.4628130Z * What went wrong:2024-02-05T07:23:33.4628760Z A problem occurred evaluating settings 'nativeTemplate'.2024-02-05T07:23:33.4629650Z > Could not read script '/Users/runner/work/1/s/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' as it does not exist.2024-02-05T07:23:33.4630130Z 2024-02-05T07:23:33.4630570Z * Try:2024-02-05T07:23:33.4631170Z > Run with --stacktrace option to get the stack trace.2024-02-05T07:23:33.4631820Z > Run with --info or --debug option to get more log output.2024-02-05T07:23:33.4632480Z > Run with --scan to get full insights.2024-02-05T07:23:33.4632870Z 2024-02-05T07:23:33.4633350Z * Get more help at https://help.gradle.org2024-02-05T07:23:33.4633720Z 2024-02-05T07:23:33.4634150Z BUILD FAILED in 15s2024-02-05T07:23:34.5871280Z Error: /Users/runner/work/1/s/android/gradlew failed with return code: 12024-02-05T07:23:34.5950090Z     at ChildProcess.<anonymous> (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/1.128.0/node_modules/vsts-task-lib/toolrunner.js:569:30)2024-02-05T07:23:34.5956230Z     at emitTwo (events.js:106:13)2024-02-05T07:23:34.5957680Z     at ChildProcess.emit (events.js:191:7)2024-02-05T07:23:34.5959040Z     at maybeClose (internal/child_process.js:920:16)2024-02-05T07:23:34.5960380Z     at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)2024-02-05T07:23:34.6076350Z ##[error]Error: /Users/runner/work/1/s/android/gradlew failed with return code: 12024-02-05T07:23:34.6119230Z ##[section]Finishing: Gradle Task2024-02-05T07:23:34.6138420Z Skipping step due to condition evaluation.Evaluating: succeeded()Result: False
asked
1 answers
0

Hi there,

 

I reckon you're making use of Android Studio? If so, Could you maybe repeat the following steps (if you haven't already) and try to build your app again:

 

  1. Run npm install (for NPM v7 and above run npm install --legacy-peer-deps) in the app root to install the required dependencies.

  2. Run npm run configure to apply the configuration from the Mendix Native Mobile Builder to the app.

  3. Open Android Studio.

  4. Select the <Native Template root>/android as the entry point for the app.

 

I don't know all that much about the Native aspect, but it sounds like a missing dependency.

 

I really hope this helps.

answered