Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10
2,780
Solution 1
All dependency requests in your script end up with the same error
Connect to 127.0.0.1:1088 [/127.0.0.1] failed: Connection refused (Connection refused)
It may be the case that you have configured your system to use a local proxy server, but it's not actually running on that 1088 port.
Solution 2
As the Jcenter() is depracated now in 2021, You can add the mavencentral in Project Level Gradle as
repositories {
google()
mavenCentral()
}
Comments
-
Zenko over 1 year
I'm new to Android programming but not so new to Flutter. So far I have been testing on iOS. Now when I want to test on Android I got this problem:
FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'android'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10. Required by: project : > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10. > Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.10/kotlin-gradle-plugin-1.4.10.pom'. > Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.10/kotlin-gradle-plugin-1.4.10.pom'. > Connect to 127.0.0.1:1088 [/127.0.0.1] failed: Connection refused (Connection refused) > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10. > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.10/kotlin-gradle-plugin-1.4.10.pom'. > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.10/kotlin-gradle-plugin-1.4.10.pom'. > Connect to 127.0.0.1:1088 [/127.0.0.1] failed: Connection refused (Connection refused) > Could not resolve com.google.gms:google-services:4.3.3. Required by: project : > Could not resolve 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'. > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'. > Connect to 127.0.0.1:1088 [/127.0.0.1] failed: Connection refused (Connection refused) > Could not resolve com.google.gms:google-services:4.3.3. > Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'. > Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'. > Connect to 127.0.0.1:1088 [/127.0.0.1] failed: Connection refused (Connection refused) * 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
Here is my
android/build.gradle
:buildscript { ext.kotlin_version = '1.4.10' repositories { google() // Google's Maven repository jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.3' } } allprojects { repositories { google() // Google's Maven repository jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir }
Since I'm not very familiar with android and its problems, please let me know if there is anything else I need to include here in this question.
Thank you
-
Donki almost 3 yearsCould you elaborate this, or tell how to fix it?
-
ec2011 over 2 yearsjcenter is deprecated but as per JFrog's announcement ConanCenter and JCenter will remain available for the time being.