[英]Android app not run and show error after update flutter
A problem occurred configuring root project 'android'.配置根项目“android”时出现问题。
Could not resolve all artifacts for configuration ':classpath'.
无法解析配置“:classpath”的所有工件。 Could not resolve com.android.tools.build.gradle:4.1.0.
无法解析 com.android.tools.build.gradle:4.1.0。 Required by: project: > Could not resolve com.android.tools.build.gradle:4.1.0.
要求:项目:> 无法解析 com.android.tools.build.gradle:4.1.0。 > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build.gradle/4.1.0/gradle-4.1.0.pom'.
> 无法获取资源“https://dl.google.com/dl/android/maven2/com/android/tools/build.gradle/4.1.0/gradle-4.1.0.pom”。 > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build.gradle/4.1.0/gradle-4.1.0.pom'.
> 无法获取“https://dl.google.com/dl/android/maven2/com/android/tools/build.gradle/4.1.0/gradle-4.1.0.pom”。 > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not resolve com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0.
> sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径无法解析 com.google.android.libraries.mapsplatform.secrets-gradle-插件:秘密-gradle-plugin:1.3.0。 Required by: project: > Could not resolve com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0.
要求:项目:> 无法解析 com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0。 > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/android/libraries/mapsplatform/secrets-gradle-plugin/secrets-gradle-plugin/1.3.0/secrets-gradle-plugin-1.3.0.pom'.
> 无法获取资源“https://dl.google.com/dl/android/maven2/com/google/android/libraries/mapsplatform/secrets-gradle-plugin/secrets-gradle-plugin/1.3.0/secrets- gradle-plugin-1.3.0.pom'。 > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/android/libraries/mapsplatform/secrets-gradle-plugin/secrets-gradle-plugin/1.3.0/secrets-gradle-plugin-1.3.0.pom'.
> 无法获取“https://dl.google.com/dl/android/maven2/com/google/android/libraries/mapsplatform/secrets-gradle-plugin/secrets-gradle-plugin/1.3.0/secrets-gradle -plugin-1.3.0.pom'。 > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not resolve com.google.gms:google-services:4.3.3.
> sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径无法解析 com.google.gms:google-services:4.3.3。 Required by: project: > Could not resolve com.google.gms:google-services:4.3.3.
要求:项目:> 无法解析 com.google.gms:google-services:4.3.3。 > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
> 无法获取资源“https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom”。 > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
> 无法获取“https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom”。
Try尝试
flutter clean
And then,然后,
flutter pub get
Make sure you have a good inte.net connection.确保您的互联网连接良好。
If this doesn't work,如果这不起作用,
Delete pubspec.lock
file and run the above commands again.删除
pubspec.lock
文件并再次运行上述命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.