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


   > installing platform 30 won't be effective and pointless anyway because of 
other gradle project properties files,
   
   As noted in my notes above but the workaround will still build a target 30 
SDK, which will still enable API changes that API 30 will introduce.
   
   If using API 30 platform SDK is a requirement, a temporary full workaround 
is to modify the following:
   
   /platforms/android/project.properties:
   ```
   target=android-30
   ```
   
   /platforms/android/CordovaLib/project.properties:
   ```
   target=android-30
   ```
   
   Currently the compile SDK version is can be overrided using the 
`cdvCompileSdkVersion` flag e.g:
   ```
   cordova build android --release -- --gradleArg=-PcdvCompileSdkVersion=30
   ```
   
   Lastly, of course you still need the `android-targetSdkVersion` preference 
in your `config.xml` file:
   ```
   <preference name="android-targetSdkVersion" value="30" />
   ```
   
   Cordova may overwrite changes to files inside `/platforms/` so I'd advise 
crafting a `before_build` 
[hook](https://cordova.apache.org/docs/en/10.x/guide/appdev/hooks/index.html).


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to