简体   繁体   中英

Cordova plugins failed to load

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)

在 android studio 上调试

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM