Colin M
Colin M

Reputation: 71

How to tell Cordova/Gradle to use Android SDK 34?

I've just upgraded Cordova (10.1.2 -> 12.0.0) and Cordova-android (11.0.1 -> 12.0.1). Our build used to use Gradle 6.9.2 but I've increased that to 7.6.2.

Our plugins include cordova-plugin-firebasex 16.1.0.

When I try running cordova build android, the firebasex piece falls over with a complaint about not having Android build tools 33.0.2:

* What went wrong:
A problem occurred evaluating script.
> No usable Android build tools found. Highest 33.x installed version is 33.0.0; Recommended version is 33.0.2.

I checked Android Studio and can't find any way to bump up the version from 33.0.0 to 33.0.2. I do, however, have 34.0.0 but for some reason Cordova/Gradle insist on using 33.0.0 and this fails the minimum version check.

How do I tell the build to use 34.0.0, or increase the version used in the build to 33.0.2?

Upvotes: 2

Views: 2555

Answers (1)

Colin M
Colin M

Reputation: 71

Ah, never mind - as per this link ( How do I install a previous version of build tools in addition to the sdk? ) I can click 'Package Details' under SDK tools to install a previous version of the build tools, like 33.0.2. Phew!

Upvotes: 4

Related Questions