You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "bluetech (via GitHub)" <gi...@apache.org> on 2026/07/23 13:53:30 UTC
[I] Unable to target Android API Level 37 - requirements check fails due to `37.0` vs. `37` [cordova-android]
bluetech opened a new issue, #1982:
URL: https://github.com/apache/cordova-android/issues/1982
# Bug Report
## Problem
I tried setting `<preference name="android-targetSdkVersion" value="37" />` in my config.xml, however the build requirements check then fails.
### What is expected to happen?
The requirements check should pass, the appropriate SDK should be used.
### What does actually happen?
The requirements check fails:
```
npm notice run 'cordova' prepare android
Discovered platform "android". Adding it to the project
Using cordova-fetch for cordova-android@15.1.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.pcentra.ravkavonlinemobiletest
Name: [STAGING] Rav-Kav Online
Activity: MainActivity
Android Target SDK: android-37
Android Compile SDK: 37
<snip>
npm notice run 'cordova' requirements android
Requirements check results for android:
Java JDK: installed 17.0.19
Android SDK: installed true
Android target: not installed
Please install the Android SDK Platform "platforms;android-37"
Gradle: installed /usr/share/java/gradle/bin/gradle
Some of requirements check failed
```
## Information
I do have the Android 37.0 and 37.1 SDKs installed:
```
$ android sdk list
platforms/android-37.0 2.0.0 Android SDK Platform 37.0
platforms/android-37.1 1.0.0 Android SDK Platform 37.1
```
I believe the problem occurs because there is no `platforms/android-37`, just `platforms/android-37.0`.
The code in [check_reqs.js](https://github.com/apache/cordova-android/blob/ed4e629e9da5721fdaa10dd6da5c85049723686e/lib/check_reqs.js#L44) takes the `android-targetSdkVersion` config (which correctly must be an integer, since `targetSdk` is an integer) and constructs `android-37` from it. I think the code would need to be adjusted to account for the `.0`/`.1` (maybe taking the latest, or allowing to choose?).
### Command or Code
Set `<preference name="android-targetSdkVersion" value="37" />`, run a `cordova requirements android` check.
### Environment, Platform, Device
Build environment, Linux.
### Version information
Cordova CLI 13.0.0
Cordova Android 15.0.1
Android Studio 2026.1.2
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Unable to target Android API Level 37 - requirements check fails due to `37.0` vs. `37` [cordova-android]
Posted by "bluetech (via GitHub)" <gi...@apache.org>.
bluetech closed issue #1982: Unable to target Android API Level 37 - requirements check fails due to `37.0` vs. `37`
URL: https://github.com/apache/cordova-android/issues/1982
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Unable to target Android API Level 37 - requirements check fails due to `37.0` vs. `37` [cordova-android]
Posted by "erisu (via GitHub)" <gi...@apache.org>.
erisu commented on issue #1982:
URL: https://github.com/apache/cordova-android/issues/1982#issuecomment-5059648666
The current official release of Cordova-Android supports **SDK 36.x**.
The following configuration may be enough to get the build to pass with **SDK 37.x**.
It appeared to build successfully for me, although I haven't tested it extensively.
```xml
<platform name="android">
<preference name="android-targetSdkVersion" value="37" />
<preference name="android-buildToolsVersion" value="37.0.0" />
<preference name="GradleVersion" value="9.5.1" />
<preference name="AndroidGradlePluginVersion" value="9.3.0" />
</platform>
```
A fresh build may be required. For example, remove the `platforms` directory and run:
```sh
cordova prepare
```
Mileage may vary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Unable to target Android API Level 37 - requirements check fails due to `37.0` vs. `37` [cordova-android]
Posted by "bluetech (via GitHub)" <gi...@apache.org>.
bluetech commented on issue #1982:
URL: https://github.com/apache/cordova-android/issues/1982#issuecomment-5083207991
> The current official release of Cordova-Android supports SDK 36.x.
Indeed. I thought I could check compatibility with some 37 things, but better to wait for official support, so I'll close this issue now.
> The following configuration may be enough to get the build to pass with SDK 37.x.
Yes, I think the `cordova build android` command can work, but my build scripts always perform `cordova requirements android` beforehand; I guess some time ago that it's a good idea to make sure it passes. Most likely the problem I described is only relevant for the requirements check, that that code specifically doesn't expect a minor on the Android SDK version.
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org