Play Store requirement for targetSdkVersion 35

What platform are you building for?

Android

What framework are you building with?

Cordova

What is your build ID?

8ed5493e-224d-47bc-a323-0906f10176ab

What is your error message?

Hello,
I need to compile my Cordova app in order to meet the new Play Store requirement for targetSdkVersion 35.
My config.xml:
engine name=“android” spec=“12.0.0”
preference name=“android-minSdkVersion” value=“22”
preference name=“android-targetSdkVersion” value=“34”

My new config.xml should be?
engine name=“android” spec=“13.0.0”
preference name=“android-minSdkVersion” value=“22”
preference name=“android-targetSdkVersion” value=“35”

Thanks in advance!

I’d also like confirmation on this for the future.

This is what I used successfully (9 applications were accepted with these settings). Most likely overkill.

I used this as a reference, so I guess I was a bit bleeding edge (dev track):
https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html
I got no warnings or errors during building or publishing.

    <engine name="android" spec="14.0.0" />
    <preference name="android-minSdkVersion" value="24"/>
    <preference name="android-targetSdkVersion" value="35"/>
    <preference name="android-compileSdkVersion" value="35" />

The correct reference should be this one:
https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html
So your settings should be right.

I noted that the config.xml of the VoltBuilder Cordova sample doesn’t have any of these settings, so what’s up with that?

Others might have different ideas.

By default we use the highest version available of the cordova android engine - currently 14.0.1. This defaults the minimum SDK version to 24, the target SDK to 35 and the compile SDK defaulting to the target SDK. You should find that if you remove those 4 lines your app should compile as expected.

We’ve seen quite a few questions lately regarding this exact play store message and in nearly all cases it was because the engine or target SDK was pinned to a lower version than required by Google.

1 Like

Can it be seen in the log what got selected automatically?

A bit surprised you use dev, but maybe that’s the only way to keep up.

The log will mention the engine and SDK used. We actually don’t use dev, we use the latest released version if none is specified. This is a good idea for development, but once you hit production it’s a good idea to pin your dependencies so you can control the updates, but to check those dependencies often.

I figure the confusion is due to the documentation being “dev” not the code.

Anyhow, “dev” says 14, 24-35 while “12-x-2025.01 (Latest)” says 13, 24-34, yet of course 35 is required now.

Then my approach with locking values was a good one.