0

I want to add google ads to my app. I rearrange pubspec file and AndroidManifest.xml file in android\app\main. but I get error as

The plugin google_mobile_ads requires a higher Android SDK version.
Fix this issue by adding the following to the file
C:\Users\dursu\AndroidStudioProjects\sqlitexample\android\app\build.gradle:

android {                                                                                     
   defaultConfig {                                                                             
     minSdkVersion 19                                                                             }                                                                                           
 }   

when I opened build. gradle file it is like this

   defaultConfig {
        applicationId "com.example.sqlitexample"
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

When I replace minSdVersion flutter.minSdkVersion with 19 I get another crazy error ; Error while merging dex archives: The number of method references in a .dex file cannot exceed 64K.

D. GÜL
  • 3
  • 5

1 Answers1

0

uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared [Flutter v2.8.1]

this question was solved here. solution worked for me but why android studio warn user to change sdk 21 instead of 19

D. GÜL
  • 3
  • 5