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
Related
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
I am new to Android Studio. My build compiles successfully until I try to generate a signed APK. Here is my current build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have looked at previous Stack Overflow answers and they all recommend putting the google() repository first, which I have done. I have also tried just adding "com.android.tools.lint:lint-gradle:27.1.1" to the dependencies section, but that has not worked.
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not resolve com.android.tools.lint:lint-gradle:27.1.1.
Required by:
project :app
> Could not resolve com.android.tools.lint:lint-gradle:27.1.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/27.1.1/lint-gradle-27.1.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/27.1.1/lint-gradle-27.1.1.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.android.tools.lint:lint-gradle:27.1.1.
Any assistance is appreciated!
If you are not actively linting a project, it might be easier just to disable it.
android {
...
lintOptions {
checkReleaseBuilds false
}
}
That code should prevent that particular gradle task for running.
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.
I tried to build an andruid application using latest andruid studio
Seems that gradle is blocked due to lack of jcenter certificate in local machine certstore. My colleguee succeed to build it on his machine so the problem is in the configuration and not the application code
Configuration : andruid studio 3.0.1, gradle 3.0.0 ?, windows 7
I also tried to workaround ssl handshake by replacing jcenter() in build.gradle with
maven {
url "http://jcenter.bintray.com"
}
but it didn't solve the problem
My build.gradle below:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Gradle console:
Executing tasks: [assemble]
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'PDA'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'http://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not HEAD 'http://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Connect to repo.jfrog.org:80 [repo.jfrog.org/52.72.224.151, repo.jfrog.org/34.204.33.255] failed: Connection timed out: connect
The plugin v.3.x.x
classpath 'com.android.tools.build:gradle:3.0.0'
is not in jcenter.
You have to use the google maven repo.
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
If you are using Android Studio 3 and gradle v.4.x you can use the google() shortcut
buildscript {
repositories {
...
google()
}
}
Besides as #GabrieleMariotti alreay said, that library will not be found at JCenter, you should not get Connection timed out: connect but a message that the library was not found.
Connection timed out: connect hints, that you cannot access that URL from your machine. My best guess is that you have to use some Proxy to access this URL that properly configured for your colleague, but not for you.
I'm trying to create profile for my andoird application with this command:
./gradlew assemleDebug --dry-run --configure-on-demand --daemon --profile
after run command i get this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'CafeAlachiqPro'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.0.0-beta2.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.jar
Required by:
project :
BUILD FAILED in 7s
I'm using latest version of gradle and i set that on application gradle file as:
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
Try to add new Google Maven repository to your build.gradle file:
maven { url 'https://maven.google.com' }