breautek commented on issue #1729:
URL: 
https://github.com/apache/cordova-android/issues/1729#issuecomment-2263282015

   Firstly, thanks for the detailed report. It helps quickly rule out A LOT of 
potential causes.
   
   cordova-android@13 by default targets API 34. But given that even after 
explicitly using the preference the build is still producing an API 33 target 
leads me to believe that there is a plugin or something overriding.
   
   > I cannot find any targetSdkVersion, see
   
   This is because SDK stuff is no longer set in AndroidManifest.xml directly. 
It's configured in gradle build scripts instead. The gradle build will merge in 
the configurations (which back in the day were manually set in 
AndroidManifest.xml), hence why you see it in the intermediates merged 
manifest's build artefact.
   
   If you're able to open the project in Android Studio, look at your 
AndroidManifest and use the `Merged Manifest` tab, you'll see the `<uses-sdk>` 
directive which is what the current state of the project will produce on build 
after all the merges occur. You'll also see a window of all the sources used to 
produce the merged manifest.
   
   Unfortunately the merged manifest while does link to manifest sources, 
including gradle files, it doesn't really point to you where the exact source 
is, so some digging will still be required.
   
   Cordova projects will have a config that looks like this in the app's 
build.gradle:
   
   ```
   defaultConfig {
           versionCode cdvVersionCode ?: new BigInteger("" + 
privateHelpers.extractIntFromManifest("versionCode"))
           applicationId cordovaConfig.PACKAGE_NAMESPACE
   
           minSdkVersion cordovaConfig.MIN_SDK_VERSION
           if (cordovaConfig.MAX_SDK_VERSION != null) {
               maxSdkVersion cordovaConfig.MAX_SDK_VERSION
           }
           targetSdkVersion cordovaConfig.SDK_VERSION
           compileSdkVersion cordovaConfig.COMPILE_SDK_VERSION
       }
   ```
   
   And the cordovaConfig values will be sourced from 
`/platforms/android/cdv-gradle-config.json`
   
   So I would:
   
   1. Double check that the defaultConfig is in tact (inside 
`/platforms/android/app/build.gradle`) and especially for the `targetSdkVersion 
cordovaConfig.SDK_VERSION`.
   2. Double check the `cdv-gradle-config.json` file and ensure that it 
contains `"SDK_VERSION": 34` in it. If it's some other value, like `33` then it 
means something is overriding the preference somehow, or for some reason, or 
the json file is simply not being updated for some reason.
   3. If the above looks right/ok, then it would be time to start scanning the 
gradle files, especially any custom ones that plugins might be introducing to 
see if they were defining a `targetSdk` or `targetSdkVersion` (they both do the 
same thing, I believe one of them is deprecated).
   
   I'm pretty confident that Cordova itself is behaving correctly, based on my 
own personal usages of Cordova. So I'd be pretty surprise if the issue is 
within the Cordova framework itself... This isn't an issue I've yet to see so 
that's why I'm pretty suspicious of a misbehaving plugin setting the target 
SDK, potentially overriding the application (since plugins becomes part of the 
application).
   
   Let me know if this helps or what you find.
   
   
   


-- 
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-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to