[英]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.