Does anyone encounters this error while generating native .apk for distribution?
0
I've been trying to generate the .apk for distribution to begin testing the native app of our application. I followed this documentation to generate it: https://docs.mendix.com/refguide/mobile/distributing-mobile-apps/building-native-apps/deploying-native-app/ Despite my efforts, including trying from different computers and internet connections, the process continues to fail. I'll attach the android.log file that contains the errors and include a specific part of it here. Does anyone know if there is a way to generate the .apk for distribution locally on my computer instead of in the cloud? This might help prevent these errors or at least allow me to fix them more easily. From what I understand, the guides for local generation of .apks are primarily for development and testing, but I might be mistaken. Can anyone assist me with this? Here's the error i mentioned: 2024-07-15T19:27:15.8585280Z Starting a Gradle Daemon (subsequent builds will be faster) 2024-07-15T19:27:17.2800280Z Configuration on demand is an incubating feature.2024-07-15T19:27:22.6113510Z Gradle 8.0.1 2024-07-15T19:27:28.3306490Z Gradle 8.0.1 2024-07-15T19:28:17.0838710Z 2024-07-15T19:28:17.0845140Z > Configure project :gradle-plugin 2024-07-15T19:28:17.0881780Z Resolved org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22 in detachedConfiguration1 2024-07-15T19:28:17.0885150Z Resolved org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.7.22 in :classpath 2024-07-15T19:28:41.0777740Z Project react-native-gradle-plugin at : is either no Android app project or build version has not been set to override. Skipping... 2024-07-15T19:28:48.4993750Z 2024-07-15T19:28:48.5098570Z > Configure project : 2024-07-15T19:28:48.5100530Z :Mendix: Registering class paths 2024-07-15T19:28:50.9107040Z Resolved org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21 in :classpath 2024-07-15T19:28:50.9107810Z Project nativeTemplate at : is either no Android app project or build version has not been set to override. Skipping... 2024-07-15T19:28:51.0108970Z 2024-07-15T19:28:51.1111330Z FAILURE: Build failed with an exception. 2024-07-15T19:28:51.1774740Z 2024-07-15T19:28:51.2606330Z * What went wrong: 2024-07-15T19:28:51.2698810Z A problem occurred configuring root project 'nativeTemplate'. 2024-07-15T19:28:51.2816250Z > Could not determine the dependencies of null. 2024-07-15T19:28:51.2936870Z > Could not resolve all task dependencies for configuration ':classpath'. 2024-07-15T19:28:51.3025670Z > Could not resolve com.android.tools.build:gradle:7.4.0. 2024-07-15T19:28:51.3067740Z Required by: 2024-07-15T19:28:51.3113410Z project : 2024-07-15T19:28:51.3132130Z > No matching variant of com.android.tools.build:gradle:7.4.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.1' but: 2024-07-15T19:28:51.3166720Z - Variant 'apiElements' capability com.android.tools.build:gradle:7.4.0 declares a library, packaged as a jar, and its dependencies declared externally: 2024-07-15T19:28:51.3235130Z - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8 2024-07-15T19:28:51.3236470Z - Other compatible attribute: 2024-07-15T19:28:51.3265390Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.3291030Z - Variant 'javadocElements' capability com.android.tools.build:gradle:7.4.0 declares a component for use during runtime, and its dependencies declared externally:2024-07-15T19:28:51.3321160Z - Incompatible because this component declares documentation and the consumer needed a library 2024-07-15T19:28:51.3348840Z - Other compatible attributes: 2024-07-15T19:28:51.3359110Z - Doesn't say anything about its target Java version (required compatibility with Java 8) 2024-07-15T19:28:51.3388750Z - Doesn't say anything about its elements (required them packaged as a jar) 2024-07-15T19:28:51.3449950Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.3518620Z - Variant 'runtimeElements' capability com.android.tools.build:gradle:7.4.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: 2024-07-15T19:28:51.3550250Z - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8 2024-07-15T19:28:51.3560070Z - Other compatible attribute: 2024-07-15T19:28:51.3583110Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.3614830Z - Variant 'sourcesElements' capability com.android.tools.build:gradle:7.4.0 declares a component for use during runtime, and its dependencies declared externally: 2024-07-15T19:28:51.3651520Z - Incompatible because this component declares documentation and the consumer needed a library 2024-07-15T19:28:51.3702180Z - Other compatible attributes: 2024-07-15T19:28:51.3760870Z - Doesn't say anything about its target Java version (required compatibility with Java 8) 2024-07-15T19:28:51.3818470Z - Doesn't say anything about its elements (required them packaged as a jar) 2024-07-15T19:28:51.3837420Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.3866870Z > Could not resolve com.facebook.react:react-native-gradle-plugin. 2024-07-15T19:28:51.3912660Z Required by: 2024-07-15T19:28:51.3962770Z project : 2024-07-15T19:28:51.3992000Z > No matching variant of project :gradle-plugin was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.1' but: 2024-07-15T19:28:51.4032430Z - Variant 'apiElements' capability com.facebook.react:react-native-gradle-plugin:unspecified declares a library, packaged as a jar, and its dependencies declared externally: 2024-07-15T19:28:51.4089350Z - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8 2024-07-15T19:28:51.4125840Z - Other compatible attribute: 2024-07-15T19:28:51.4155080Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.4179760Z - Variant 'mainSourceElements' capability com.facebook.react:react-native-gradle-plugin:unspecified declares a component, and its dependencies declared externally: 2024-07-15T19:28:51.4209310Z - Incompatible because this component declares a component of category 'verification' and the consumer needed a library2024-07-15T19:28:51.4242700Z - Other compatible attributes: 2024-07-15T19:28:51.4272120Z - Doesn't say anything about its target Java version (required compatibility with Java 8) 2024-07-15T19:28:51.4508450Z - Doesn't say anything about its elements (required them packaged as a jar) 2024-07-15T19:28:51.4637950Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1')2024-07-15T19:28:51.4684300Z - Doesn't say anything about its usage (required runtime) 2024-07-15T19:28:51.4844680Z - Variant 'runtimeElements' capability com.facebook.react:react-native-gradle-plugin:unspecified declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: 2024-07-15T19:28:51.4846040Z - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8 2024-07-15T19:28:51.4887520Z - Other compatible attribute: 2024-07-15T19:28:51.4934390Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.4976470Z - Variant 'testResultsElementsForTest' capability com.facebook.react:react-native-gradle-plugin:unspecified: 2024-07-15T19:28:51.5036440Z - Incompatible because this component declares a component of category 'verification' and the consumer needed a library 2024-07-15T19:28:51.5077270Z - Other compatible attributes: 2024-07-15T19:28:51.5130130Z - Doesn't say anything about how its dependencies are found (required its dependencies declared externally) 2024-07-15T19:28:51.5191260Z - Doesn't say anything about its target Java version (required compatibility with Java 8) 2024-07-15T19:28:51.5251930Z - Doesn't say anything about its elements (required them packaged as a jar)2024-07-15T19:28:51.5360970Z - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') 2024-07-15T19:28:51.5361810Z - Doesn't say anything about its usage (required runtime) 2024-07-15T19:28:51.5361980Z 2024-07-15T19:28:51.5362190Z * Try: 2024-07-15T19:28:51.5362550Z > Run with --stacktrace option to get the stack trace. 2024-07-15T19:28:51.5363000Z > Run with --info or --debug option to get more log output. 2024-07-15T19:28:51.5363390Z > Run with --scan to get full insights. 2024-07-15T19:28:51.5363520Z 2024-07-15T19:28:51.5363770Z * Get more help at https://help.gradle.org 2024-07-15T19:28:51.5363910Z 2024-07-15T19:28:51.5364160Z BUILD FAILED in 1m 42s 2024-07-15T19:28:52.1934400Z Error: /Users/runner/work/1/s/android/gradlew failed with return code: 1 2024-07-15T19:28:52.3843060Z 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-07-15T19:28:52.3871120Z at emitTwo (events.js:106:13) 2024-07-15T19:28:52.4873100Z at ChildProcess.emit (events.js:191:7) 2024-07-15T19:28:52.5875320Z at maybeClose (internal/child_process.js:920:16) 2024-07-15T19:28:52.6309410Z at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 2024-07-15T19:28:52.6484210Z ##[error]Error: /Users/runner/work/1/s/android/gradlew failed with return code: 1 2024-07-15T19:28:52.6512430Z ##[section]Finishing: Gradle Task 2024-07-15T19:28:52.6566020Z Skipping step due to condition evaluation.Evaluating: succeeded()Result: False