The project folder is perfect. The error is in visual studio,flutter files or something.
I know there are old versions of VisualStudio and Flutter but my project was working perfectly in these versions. The errors appeared with a wrong update of visual studio, I downgraded it to the version I used to use but the errors persisted
Error Description:
FAILURE: Build failed with an exception.
- What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not resolve io.grpc:grpc-core:[1.21.0]. Required by: project :app > io.grpc:grpc-okhttp:1.21.0 > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message)
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 13s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 14,1s
Exception: Gradle task assembleDebug failed with exit code 1
Flutter Doctor: Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Versión 10.0.19043.1645], locale es-AR)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [√] Android Studio (version 4.0) [√] VS Code (version 1.62.3) [√] Connected device (1 available)
• No issues found!
CodePudding user response:
Modify the build.gradle file as below
Before
repositories {
google()
jcenter()
}
After
repositories {
google()
mavenCentral()
}
Good luck.