Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Android build tools 31.0.0 as it is not working (Error: No installed build tools found. Install the Android build tools version 30.0.3 or higher) #1335

Closed
3 tasks done
almothafar opened this issue Sep 2, 2021 · 6 comments

Comments

@almothafar
Copy link

almothafar commented Sep 2, 2021

Bug Report

Problem

It is a different issue from #1334 which sounds like the gradle file built is not really catching the minimum build tool version? Does it seem there is an issue still around this PR #1294 maybe? or #1212? Not sure, anyway, the version installed is 31.0.0 but it does not see it.

image

What is expected to happen?

To build a mobile app without any issues.

What does actually happens?

Building mobile app failed with error:

#14 44.71 Starting a Gradle Daemon (subsequent builds will be faster)
#14 46.25 The project name 'Example App' contains at least one of the following characters: [ , /, \, :, <, >, ", ?, *, |]. This has been deprecated and is scheduled to be removed in Gradle 5.0. Set the 'rootProject.name' or adjust
the 'include' statement (see https://docs.gradle.org/4.4.1/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:include(java.lang.String[]) for more details).
#14 46.25       at cdv_gradle_name_8neze90c97pug80jthvdwzhsy.run(/app/platforms/android/cdv-gradle-name.gradle:2)
#14 46.25       (Run with --stacktrace to get the full stack trace of this deprecation warning.)
#14 46.54 :wrapper
#14 46.77
#14 46.77 BUILD SUCCESSFUL in 2s
#14 46.77 1 actionable task: 1 executed
#14 47.11 Subproject Path: CordovaLib
#14 47.11 Subproject Path: app
#14 47.11 Gradle Distribution URL: https\://services.gradle.org/distributions/gradle-7.2-all.zip
#14 47.22 Downloading https://services.gradle.org/distributions/gradle-7.2-all.zip
#14 50.53 .....................................................................................................................................................
#14 57.64 Unzipping /home/ionic/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d/gradle-7.2-all.zip to /home/ionic/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d
#14 59.42 Set executable permissions for: /home/ionic/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d/gradle-7.2/bin/gradle
#14 59.79
#14 59.79 Welcome to Gradle 7.2!
#14 59.79
#14 59.79 Here are the highlights of this release:
#14 59.79  - Toolchain support for Scala
#14 59.79  - More cache hits when Java source files have platform-specific line endings
#14 59.79  - More resilient remote HTTP build cache behavior
#14 59.79
#14 59.79 For more details see https://docs.gradle.org/7.2/release-notes.html
#14 59.79
#14 59.88 Starting a Gradle Daemon (subsequent builds will be faster)
#14 67.18
#14 67.18 FAILURE: Build failed with an exception.
#14 67.18
#14 67.18 * Where:
#14 67.18 Script '/app/platforms/android/CordovaLib/cordova.gradle' line: 69
#14 67.18
#14 67.18 * What went wrong:
#14 67.18 A problem occurred evaluating script.
#14 67.18 > No installed build tools found. Install the Android build tools version 30.0.3 or higher.
#14 67.18
#14 67.18 * Try:
#14 67.18 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.
#14 67.18
#14 67.18 * Get more help at https://help.gradle.org
#14 67.28
#14 67.28 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
#14 67.28
#14 67.28 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
#14 67.28
#14 67.28 See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
#14 67.28
#14 67.28 BUILD FAILED in 20s
#14 67.60 Command failed with exit code 1: /app/platforms/android/gradlew :app:bundleRelease -b /app/platforms/android/build.gradle
#14 67.60 Error: Command failed with exit code 1: /app/platforms/android/gradlew :app:bundleRelease -b /app/platforms/android/build.gradle
#14 67.60     at makeError (/app/node_modules/execa/lib/error.js:60:11)
#14 67.60     at handlePromise (/app/node_modules/execa/index.js:118:26)
#14 67.60     at processTicksAndRejections (node:internal/process/task_queues:96:5)
#14 67.60     at async ProjectBuilder.build (/app/node_modules/cordova-android/lib/builders/ProjectBuilder.js:316:20)
#14 67.61 [ERROR] An error occurred while running subprocess cordova.
#14 67.61
#14 67.61         cordova build android --release --buildConfig build.json -d exited with exit code 1.
#14 67.61
#14 67.61         Re-running this command with the --verbose flag may provide more information.

Information

Command or Code

To save you some time, please see this repo
https://github.com/capellasolutions/ionic-cordova-docker/tree/develop/example-app make sure you have version 31.0.0 in line https://github.com/capellasolutions/ionic-cordova-docker/blob/develop/example-app/app-builder.Dockerfile#L77

Environment, Platform, Device

Version information

Using cordova-android: 10.1.0

Ionic info:

Ionic:

   Ionic CLI                     : 6.17.0 (/home/almothafar/.npm-global/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.7.0
   @angular-devkit/build-angular : 12.2.3
   @angular-devkit/schematics    : 12.2.3
   @angular/cli                  : 12.2.3
   @ionic/angular-toolkit        : 4.0.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed globally
   native-run  : not installed globally

System:

   NodeJS : v16.4.1 (/usr/bin/node)
   npm    : 7.21.1
   OS     : Linux 5.10

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@almothafar almothafar changed the title Regression: Support build tools 31 (No installed build tools found. Install the Android build tools version 30.0.3 or higher) Regression: Android build tools 31 not working (Error: No installed build tools found. Install the Android build tools version 30.0.3 or higher) Sep 2, 2021
@almothafar almothafar changed the title Regression: Android build tools 31 not working (Error: No installed build tools found. Install the Android build tools version 30.0.3 or higher) Regression: Android build tools 31.0.0 not working (Error: No installed build tools found. Install the Android build tools version 30.0.3 or higher) Sep 2, 2021
@erisu
Copy link
Member

erisu commented Sep 2, 2021

You need to install 30.0.3 or anything higher within the 30.x range. It can not be 31.x or higher.

If you read the description of the PR you linked: #1294

It says,

doFindLatestInstalledBuildTools will now limit its scope to the minimum version major. This means that if our minimum required version is 30.0.3, it will filter everything that is >= 31.0.0.

Basically, >=31.0.0 will not be used by default. 31.x is considered major and breaking and Cordova-Android 10 only supported the 30.x range, but we started at 30.0.3.

@erisu erisu closed this as completed Sep 2, 2021
@almothafar
Copy link
Author

@erisu why did you close this ticket then? consider it as to add support for 31 then? also, the message does not make sense still, it says higher than 30.0.3 so 31 IS higher

@almothafar
Copy link
Author

This means that if our minimum required version is 30.0.3, it will filter everything that is >= 31.0.0

then 30.0.3 Should be MAXIMUM not minimum! it does not make sense at all

@almothafar almothafar changed the title Regression: Android build tools 31.0.0 not working (Error: No installed build tools found. Install the Android build tools version 30.0.3 or higher) Support Android build tools 31.0.0 as it is not working (Error: No installed build tools found. Install the Android build tools version 30.0.3 or higher) Sep 2, 2021
@erisu
Copy link
Member

erisu commented Sep 2, 2021

What if Google decided to release 30.0.99? Then it wont be used because you said maximum.

@almothafar
Copy link
Author

almothafar commented Sep 2, 2021

What if Google decided to release 30.0.99? Then it wont be used because you said maximum.

They released 31.0.0 then I doubt there will be any new version under 30.x.. also I'm not going to discuss the message which is still misleading, I think this issue should be still open, for that I edited the title.

@erisu
Copy link
Member

erisu commented Sep 2, 2021

And please look at the issue tracker, we already had ticket request 31:

#1288

It is better to not be flooding the tracker with same requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants