0
votes

I have a bug in cordova i tried to debug it using android studio and i got failed to load resources,Iam not sure what is the problem exactly and what else to provide in order to help with the bug.

When i run the android studio i get :

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 19 declared in library[tested_artifact::CordovaLib]Mobile/platforms/android/CordovaLib/build/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 1 Suggestion: use a compatible library with a minSdk of at most 1, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

debuggin on android studio

2

2 Answers

2
votes

Fixed : i uninstalled and reinstalled All the plugins. i think only couple of them caused the bug not sure which plugin exactly .

0
votes

cordova android only supports a limited range of sdks as specified in:

https://cordova.apache.org/docs/en/latest/guide/platforms/android/

As per this page you can set these properties in one of four ways:

By setting environment variables like so: $ export ORG_GRADLE_PROJECT_cdvMinSdkVersion=20 $ cordova build android

By using the --gradleArg flag in your Cordova build or run commands: $ cordova run android -- --gradleArg=-PcdvMinSdkVersion=20

By placing a file called gradle.properties in your Android platform folder (/platforms/android) and setting the properties in it like so: # In /platforms/android/app/gradle.properties cdvMinSdkVersion=20

By extending build.gradle via a build-extras.gradle file and setting the property like so: // In /platforms/android/app/build-extras.gradle ext.cdvMinSdkVersion = 20