FAILURE: Build failed with an exception.
* Where:
Build file '/Users/***/.pub-cache/hosted/pub.flutter-io.cn/amap_core_fluttify-0.6.0+b2681d9/android/build.gradle' line: 53
* What went wrong:
A problem occurred evaluating root project 'amap_core_fluttify'.
> Cannot convert a null value to an object of type Dependency.
The following types/formats are supported:
- Instances of Dependency.
- String or CharSequence values, for example 'org.gradle:gradle-core:1.0'.
- Maps, for example [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
- FileCollections, for example files('some.jar', 'someOther.jar').
- Projects, for example project(':some:project:path').
- ClassPathNotation, for example gradleApi().
Comprehensive documentation on dependency notations is available in DSL reference for DependencyHandler type.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Exception: The plugin amap_core_fluttify could not be built due to the issue above.
在android/build.gradle中添加如下即可:
subprojects{
afterEvaluate{project->
if (project.hasProperty("android")) {
android{
compileSdkVersion29
}
}
}
}