[英]firebase messaging from minSdkVersion error on android with flutter
[英]flutter - android minSdkVersion keeps making an error
感謝您閱讀我的問題。
希望你今天過得好!
所以我的問題是,當我使用 android 仿真器運行我的 flutter 項目時,會顯示以下錯誤消息。
The plugin google_mobile_ads requires a higher Android SDK version.
Fix this issue by adding the following to the file /Users/ahnjunhyun/FlutterProjects/dubu_timer/android/app/build.gradle:
android {
defaultConfig {
minSdkVersion 19
}
}
Note that your app won't be available to users running Android SDKs below 19.
Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.
所以我將minSdkVersion
更改為minSdkVersion 19
。 然后我得到了另一個錯誤,如下所示!
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/ahnjunhyun/FlutterProjects/dubu_timer/android/app/build.gradle' line: 47
* What went wrong:
A problem occurred evaluating project ':app'.
> Cannot get property '19' on null object
有沒有人遇到同樣的問題或知道如何解決?
我需要你的幫助
您必須將 minSdkVersion 19 更新到 21 才能使用 google_mobile_ads。
defaultConfig {
applicationId "io.flutter.plugins.googlemobileadsexample"
minSdkVersion 21
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.