- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在使用 flutter 1.2,我的项目在添加 shared_preferences 包之前成功运行。我正在使用 shared_preferences: ^0.5.1+2。
添加后,flutter run
命令会产生此错误:
- Error running Gradle: ProcessException: Process "/home//Desktop/projects/fycx/android/gradlew" exited abnormally: Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
Configure project :shared_preferences
项目评估失败,包括 afterEvaluate {} 中的错误。跑 使用 --stacktrace 获取 afterEvaluate {} 错误的详细信息。
失败:构建失败,出现异常。
出了什么问题:配置项目“:shared_preferences”时出现问题。
Could not resolve all artifacts for configuration ':shared_preferences:classpath'. Could not find gradle.jar (com.android.tools.build:gradle:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.jar Could not find gradle-core.jar (com.android.tools.build:gradle-core:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.2/gradle-core-3.1.2.jar Could not find bundletool.jar (com.android.tools.build:bundletool:0.1.0-alpha01). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.1.0-alpha01/bundletool-0.1.0-alpha01.jar Could not find builder.jar (com.android.tools.build:builder:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.jar Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar Could not find gradle-api.jar (com.android.tools.build:gradle-api:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.1.2/gradle-api-3.1.2.jar Could not find compilerCommon.jar (com.android.databinding:compilerCommon:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/databinding/compilerCommon/3.1.2/compilerCommon-3.1.2.jar Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.jar Could not find sdk-common.jar (com.android.tools:sdk-common:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.jar Could not find sdklib.jar (com.android.tools:sdklib:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.1.2/sdklib-26.1.2.jar Could not find repository.jar (com.android.tools:repository:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.1.2/repository-26.1.2.jar Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.1.2/builder-test-api-3.1.2.jar Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.1.2/ddmlib-26.1.2.jar Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar Could not find shared.jar (com.android.tools.analytics-library:shared:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.1.2/shared-26.1.2.jar Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.jar Could not find dvlib.jar (com.android.tools:dvlib:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.1.2/dvlib-26.1.2.jar Could not find common.jar (com.android.tools:common:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/common/26.1.2/common-26.1.2.jar Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/0.1.0/aapt2-proto-0.1.0.jar Could not find protos.jar (com.android.tools.analytics-library:protos:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.jar Could not find builder-model.jar (com.android.tools.build:builder-model:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.jar Could not find apksig.jar (com.android.tools.build:apksig:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.jar Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.jar Could not find annotations.jar (com.android.tools:annotations:26.1.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.1.2/annotations-26.1.2.jar
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
在 https://help.gradle.org 获得更多帮助
在 51s 命令中构建失败: /home/Desktop/projects/fycx/android/gradlew app:properties
请检查您在 android/文件夹中的 Gradle 项目设置。
最佳答案
缺少 dl.google.com 支持的库这可能在您的位置被禁止,以测试它是否被禁止尝试使用 official link 从浏览器下载 flutter 源代码并查看它是否会给您拒绝访问
或打开下载对话框。在封锁的情况下打开 VPN 并使用 flutter run
运行项目将解决您的问题。
关于gradle - flutter 运行失败 : A problem occurred configuring project ':shared_preferences' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55492278/
我是一名优秀的程序员,十分优秀!