본문 바로가기

IT세상/플러터(Flutter)

플러터(Flutter) - Execution failed for task ':app:processDebugMainManifest'.

반응형

플러터 빌드를 하다가 다음과 같은 에러가 발생했습니다. 

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:google_mobile_ads] C:\MyProject\프로텍트이름\build\google_mobile_ads\intermediates\merged_manifest\debug\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="io.flutter.plugins.googlemobileads" to force usage (may lead to runtime failures)

 

최소 sdkVersion이 맞지 않다는 내용입니다.

project > android > local.properties 를 열어줍니다.

변수들이 담겨있는데 아래 내용을 추가해줍니다. 지금현재 16인데 19보다 크게 설정하라고 했으니 21로 설정했습니다.

flutter.minSdkVersion=21
flutter.targetSdkVersion=30
flutter.compileSdkVersion=30

그리고 local.properties 와 같은 경로에 app>build.gradle을 열어보면 다음과 같이 되어있습니다.

저기서 minSdkVersion과 targetSdkVersion을 다음과 같이 변경해줍니다.

 minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
 targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()

그리고 빌드를 실행하면 정상적으로 되는것을 확인 할 수 있습니다.

반응형