I try to download the gradle 2.2.2 but faild. (android studio 3.4.2)
I try it by proxy(lantern or ssr), actually it works with tests. But when I run this project it was failed. And I had tried the source of Ali. Unfortunately, this solution cant work for me. Has anyone met?
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven {
url 'https://dl.google.com/dl/android/maven2/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.taobao.android:weexplugin-gradle-plugin:1.3'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven {
url 'https://dl.google.com/dl/android/maven2/'
name 'Google'
}
}
}
proxy msg:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:2.2.2.
Required by:
:android:unspecified
> Could not resolve com.android.tools.build:gradle:2.2.2.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom'.
> org.apache.http.client.ClientProtocolException (no error message)
> Could not resolve com.android.tools.build:gradle:2.2.2.
> Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom'.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom'.
> org.apache.http.client.ClientProtocolException (no error message)
> Could not resolve com.android.tools.build:gradle:2.2.2.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom'.
> org.apache.http.client.ClientProtocolException (no error message)
> Could not resolve com.taobao.android:weexplugin-gradle-plugin:1.3.
Related
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.google.maps.android:android-maps-utils:0.5+.
Required by:
project :app
> Failed to list versions for com.google.maps.android:android-maps-utils.
> Unable to load Maven meta-data from https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview/com/google/maps/android/android-maps-utils/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview/com/google/maps/android/android-maps-utils/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview/com/google/maps/android/android-maps-utils/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Could not resolve com.theartofdev.edmodo:android-image-cropper:2.7.+.
Required by:
project :app
> Skipped due to earlier error
> Failed to list versions for com.theartofdev.edmodo:android-image-cropper.
> Unable to load Maven meta-data from https://dl.bintray.com/farhanahmed95/maven/com/theartofdev/edmodo/android-image-cropper/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/farhanahmed95/maven/com/theartofdev/edmodo/android-image-cropper/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/farhanahmed95/maven/com/theartofdev/edmodo/android-image-cropper/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
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 GRADLE
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
mavenCentral()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.18"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
classpath 'io.fabric.tools:gradle:1.31.0' // Crashlytics plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
maven {
url 'https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview'
}
maven {
url 'https://dl.bintray.com/farhanahmed95/maven/'
}
maven {
url "https://plugins.gradle.org/m2/"
}
flatDir {
dirs 'libs'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: "org.jetbrains.dokka"
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.google.maps.android:android-maps-utils:0.5+.
Required by:
project :app
> Failed to list versions for com.google.maps.android:android-maps-utils.
> Unable to load Maven meta-data from https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview/com/google/maps/android/android-maps-utils/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview/com/google/maps/android/android-maps-utils/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview/com/google/maps/android/android-maps-utils/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Could not resolve com.theartofdev.edmodo:android-image-cropper:2.7.+.
Required by:
project :app
> Skipped due to earlier error
> Failed to list versions for com.theartofdev.edmodo:android-image-cropper.
> Unable to load Maven meta-data from https://dl.bintray.com/farhanahmed95/maven/com/theartofdev/edmodo/android-image-cropper/maven-metadata.xml.
> Could not get resource 'https://dl.bintray.com/farhanahmed95/maven/com/theartofdev/edmodo/android-image-cropper/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/farhanahmed95/maven/com/theartofdev/edmodo/android-image-cropper/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
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 GRADLE
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
mavenCentral()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.18"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
classpath 'io.fabric.tools:gradle:1.31.0' // Crashlytics plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
maven {
url 'https://dl.bintray.com/samanjafaridotir/easyCountDownTimerTextview'
}
maven {
url 'https://dl.bintray.com/farhanahmed95/maven/'
}
maven {
url "https://plugins.gradle.org/m2/"
}
flatDir {
dirs 'libs'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: "org.jetbrains.dokka"
After updating com.android.tools.build:gradle and com.google.gms:google-services I can build project local (command gradlew build --scan) but in Bitrise I get BUILD FAILED and message:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'git'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.1.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.1.0.
> Could not get resource
'http://dl.bintray.com/populov/maven/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'.
> Could not GET
'http://dl.bintray.com/populov/maven/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'.
Received status code 502 from server: Bad Gateway
> Could not resolve com.google.gms:google-services:4.2.0.
Required by:
project :
> Could not resolve com.google.gms:google-services:4.2.0.
> Could not get resource 'http://dl.bintray.com/populov/maven/com/google/gms/google-
services/4.2.0/google-services-4.2.0.pom'.
> Could not GET 'http://dl.bintray.com/populov/maven/com/google/gms/google-
services/4.2.0/google-services-4.2.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve io.fabric.tools:gradle:1.28.0.
I've tried every recommendations what I found, but I still get this message.
My build.gradle file
buildscript {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
google()
mavenCentral()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven { url 'https://dl.bintray.com/android/android-tools' }
maven { url 'https://maven.fabric.io/public' }
maven {
url 'https://google.bintray.com/exoplayer/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.28.0'
classpath "me.tatarka:gradle-retrolambda:3.7.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
jcenter()
maven {
url "https://maven.google.com/"
name 'Google'
}
maven { url "https://dl.bintray.com/android/android-tools" }
maven { url "https://maven.fabric.io/public" }
maven {
url "https://google.bintray.com/exoplayer/"
}
}
}
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Seems like jcenter is currently down. (see https://jcenter.bintray.com/)
You can wait for jcenter to be up or migrate to use something else: https://developer.android.com/studio/build/jcenter-migration
This is what I get in Build tab:
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.github.chrisbanes:PhotoView:2.3.0.
Required by:
project :app
> Could not resolve com.github.chrisbanes:PhotoView:2.3.0.
> Could not get resource 'https://jitpack.io/com/github/chrisbanes/PhotoView/2.3.0/PhotoView-2.3.0.pom'.
> Could not GET 'https://jitpack.io/com/github/chrisbanes/PhotoView/2.3.0/PhotoView-2.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.github.yalantis:ucrop:2.2.2.
Required by:
project :app
> Could not resolve com.github.yalantis:ucrop:2.2.2.
> Could not get resource 'https://jitpack.io/com/github/yalantis/ucrop/2.2.2/ucrop-2.2.2.pom'.
> Could not GET 'https://jitpack.io/com/github/yalantis/ucrop/2.2.2/ucrop-2.2.2.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
project build.gradle:
buildscript {
repositories {
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
So the solution is to use embedded JDK which is recommended way.
File → Project Structure → SDK Location → Use embedded JDK
i am developing sample application in react-native , i faced this issue when i was run- android emulator my sdk tool version is 25 , but i don't know how it is getting this issue please let me suggestion.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.1.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.1.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.0/gradle-3.1.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
> Could not resolve com.android.tools.build:gradle:3.1.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.0/gradle-3.1.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
> Could not resolve com.google.gms:google-services:3.2.0.
Required by:
project :
> Could not resolve com.google.gms:google-services:3.2.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/3.2.0/google-services-3.2.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
> Could not resolve com.google.gms:google-services:3.2.0.
> Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/3.2.0/google-services-3.2.0.pom'.
> org.apache.http.ssl.SSLInitializationException: \Library\Java\Home\jre\lib\security\cacerts (The system cannot find the path specified)
* 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
Your project can not access the urls to download the necessary libraries. This is most probably a gradle configuration issue.
Change your Project level build.gradle file like this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
Update
If it doesn't work, try this too:
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
...
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
Try Using
classpath 'com.android.tools.build:gradle:3.0.1'
and then
clean and rebuild.
File > Invalidate cache and restart
It works for me!!