question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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)

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
erisucommented, Sep 2, 2021

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

0reactions
erisucommented, Sep 2, 2021

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

https://github.com/apache/cordova-android/issues/1288

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

No installed build tools found. Install the Android build tools ...
Open Android studio · Click the "More Actions" given under the Welcome window in small blue letters. · Click on SDK Manager. ·...
Read more >
[Resolved] No usable Android build tools found. Highest 30.x ...
Step 1 – Open the Android Studio ; Step 2 – Go To SDK Tools ; Step 3 – Click on “Shown Package...
Read more >
Configuring Cordova (and other things) - Stefano Balietti
What went wrong: A problem occurred evaluating project ':app'. > No installed build tools found. Install the Android build tools version 19.1.0 or...
Read more >
How to solve Android Studio Error: Installed Build Tools ...
How to solve Android Studio Error: Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
Read more >
SDK Platform Tools release notes - Android Developers
Although adb is required for Android app development, app developers will normally just use the copy Studio installs. This download is useful if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found