minSdkVersion 16 cannot be smaller than version 19 declared in library

Answered

Hello guys i have a problem which i cannot run the application, it says "minSdkVersion 16 cannot be smaller than version 19 declared in library"
I tried to change the number from AndroidManifest.xml in "\transformed\jetified-play-services-maps-18.0.2" and save it using wordpad but it keeps saying the same error

> Task :app:processDebugMainManifest FAILED
C:\Users\Gian\IdeaProjects\Mapy\app\src\main\AndroidManifest.xml Error:
    uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.google.android.gms:play-services-base:18.0.1] C:\Users\Gian\.gradle\caches\transforms-3\08cedd8d440dee889f2cf950b3489944\transformed\jetified-play-services-base-18.0.1\AndroidManifest.xml as the library might be using APIs not available in 16
    Suggestion: use a compatible library with a minSdk of at most 16,
        or increase this project's minSdk version to at least 19,
        or use tools:overrideLibrary="com.google.android.gms.base" to force usage (may lead to runtime failures)

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

so, how do i fix that? and what have i done wrong?


Thanks!!

 

0
1 comment

>I tried to change the number from AndroidManifest.xml in "\transformed\jetified-play-services-maps-18.0.2" and save it using wordpad

Android uses Gradle to build the project. So check Gradle build files and where you have the sdk version defined. Double check that the correct version is specified there. Note that some Gradle plugins may also define the sdk version in their configuration. See similar threads:

https://stackoverflow.com/q/37293082/2000323 

https://github.com/pauldemarco/flutter_blue/issues/189 

https://forum.ionicframework.com/t/build-faild-in-android-uses-sdk-minsdkversion-16-cannot-be-smaller-than-version-19-declared-in-library/132183/9 

0

Please sign in to leave a comment.