I was trying to build the services application on Android Studio (4.2.1).
My directory structure is:
When I try to build the application, it fails with the following exception:
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [org.opendatakit:demoBasicAndroidlibrary:b202110181814_v2f7fdae] C:\Users\C.gradle\caches\transforms-2\files-2.1\afcf6d04db3e34607bb60a0cb6f0450a\jetified-demoBasicAndroidlibrary-b202110181814_v2f7fdae-demoBasicRelease\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 21,
or use tools:overrideLibrary=“org.opendatakit.androidlibrary” to force usage (may lead to runtime failures)
Here’s a screenshot of the same.
The problem is that the minSDK isn’t initialized in the build.gradle file. A comment in the code says that the compileSdkVersion & the buildToolsVersion are “set in the common.gradle file.” The common.gradle file isn’t present in the project.
I’m finding myself unable to figure out how to change the minSDKVersion & fix the error. Please suggest me how I can resolve this issue.
Thanks in advance.
PS: The same errors while building occur for survey application too.