You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/02/28 05:44:29 UTC

[GitHub] Domvel edited a comment on issue #686: Bug: Cordova does not set the minSdkVersion and targetSdkVersion from config.xml correctly in the APK.

Domvel edited a comment on issue #686: Bug: Cordova does not set the minSdkVersion and targetSdkVersion from config.xml correctly in the APK.
URL: https://github.com/apache/cordova-android/issues/686#issuecomment-468140785
 
 
   This is the Android Studio solution for a native app. Thanks. But not my problem. It's about the compiled App (apk) from Cordova. There is a file `config.xml` with the property `android-minSdkVersion`. This should do this job. But the Cordova compiler does not respect this configuration. 
   
   You mean I have to load the Android project from `platforms/android` into the Android Studio and set the properties? But I don't want to modificate ("hack") the Cordova sources (platform). This should be a non tracked resource (gitignore). Cordova **have** this setting for "Min SDK Version", but it does not work. I think this is a bug. 
   
   I could set the `minSdkVersion` in the file `AndroidManifest.xml`.
   
   ```xml
   <uses-sdk
     android:minSdkVersion="19"
     android:targetSdkVersion="22" />
   ```
   
   Not tested, but I'll try it as workaround. btw. there are several AndroidManifest.xml files. 
   I don't know which file is the correct file. If I change a file I get erros like: 
   
   ```text
   Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library [:CordovaLib] %PROJECT%\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 19
           Suggestion: use a compatible library with a minSdk of at most 19,
                   or increase this project's minSdk version to at least 22,
                   or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
   ```
   Ok, maybe this is not the correct file. I'll try as successive approximation. ...
   Anyway this feature has to be work from Cordova `config.xml`!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org