我在这里遇到错误
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Ayool\Downloads\src\instagram_flutter\googlemapsapi\gmaps_api\hope_google_maps_api\mapsgoogleapi\gmapsapi\android\app\build.gradle' line: 48
* What went wrong:
A problem occurred evaluating project ':app'.
> Cannot get property '20' on null object
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
所以我尝试将 minSdk 设置为 20
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.gmapsapi"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk 20
targetSdk flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
但是会弹出这样的错误消息:“您没有用于调试 Grade 的扩展。我们是否应该找到 Marketplace 中的 Gradle 扩展?”
像这样改变它 -
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.gmapsapi"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 20 // Update here!
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}