我得到了这样的错误:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':flutter_secure_storage'.
> Could not resolve all artifacts for configuration ':flutter_secure_storage:classpath'.
> Could not download builder.jar (com.android.tools.build:builder:3.3.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.3.1/builder-3.3.1.jar'.
> Connection reset
> Could not get unknown property 'android' for project ':flutter_secure_storage' of type org.gradle.api.Project.
* 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 6s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
我该怎么解决这个问题?
您需要按照他们的官方文档配置flatter_secure_storage包。
配置安卓版本
在[项目]/android/app/build.gradle中将minSdkVersion设置为>=18.
android {
...
defaultConfig {
...
minSdkVersion 18
...
}
}