Hi Experts, Google Play is not accepting the AAB because of this issue (Your app currently targets API level 30 and must target at least API level 31 to ensure that it is built on the latest APIs optimised for security and performance. Change your app's target API level to at least 31) and I changed the build.gradle like the below: buildscript { ext { buildToolsVersion = "31.0.0" minSdkVersion = 21 compileSdkVersion = 31 targetSdkVersion = 31 kotlinVersion = "1.3.50" excludeAppGlideModule = true playServicesVersion = "16.1.0" androidXCore = "1.6.0" androidXAnnotation = "1.5.0" androidXBrowser = "1.4.0" } but when I tried to build the android app faild and the below error in log: 3-02-27T14:26:32.5787350Z FAILURE: Build failed with an exception. 2023-02-27T14:26:32.5830910Z 2023-02-27T14:26:32.5861890Z * What went wrong: 2023-02-27T14:26:32.5873760Z Execution failed for task ':app:compileAppstoreReleaseJavaWithJavac'. 2023-02-27T14:26:32.5893440Z > Compilation failed; see the compiler error output for details. 2023-02-27T14:26:32.5916800Z 2023-02-27T14:26:32.5935830Z * Try: 2023-02-27T14:26:32.5947470Z 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. 2023-02-27T14:26:32.5973660Z 2023-02-27T14:26:32.5998190Z * Get more help at https://help.gradle.org 2023-02-27T14:26:32.6030000Z 2023-02-27T14:26:32.6059830Z Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. 2023-02-27T14:26:32.6087500Z Use '--warning-mode all' to show the individual deprecation warnings. 2023-02-27T14:26:32.6113770Z See https://docs.gradle.org/5.5/***guide/command_line_interface.html#sec:command_line_warnings 2023-02-27T14:26:33.3562850Z Error: /Users/runner/work/1/s/android/gradlew failed with return code: 1 2023-02-27T14:26:33.3564540Z 512 actionable tasks: 477 executed, 35 up-to-date 2023-02-27T14:26:33.3567030Z 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) 2023-02-27T14:26:33.3567550Z 2023-02-27T14:26:33.3567920Z BUILD FAILED in 4m 33s 2023-02-27T14:26:33.3591930Z at emitTwo (events.js:106:13) 2023-02-27T14:26:33.3615080Z at ChildProcess.emit (events.js:191:7) 2023-02-27T14:26:33.3629780Z at maybeClose (internal/child_process.js:920:16) 2023-02-27T14:26:33.3656030Z at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 2023-02-27T14:26:33.4068600Z ##[error]Error: /Users/runner/work/1/s/android/gradlew failed with return code: 1 2023-02-27T14:26:33.4134210Z ##[section]Finishing: Gradle Task 2023-02-27T14:26:35.2087870Z ##[section]Starting: Sign APK
asked
Muath Battah
1 answers
0
There are multiple build.gradle files on an Android Project.
Can you please tell in which build.gradle did you make the change? the outermost build.gradle file or the one inside the app folder