the SDK-manager seems to do the detection OK:
Build tools 19.1.0 missing. Downloading...
Support library repository outdated. Downloading update...
Google Play Services repository outdated. Downloading update...
but in the end the dependencies are still missing:
A problem occurred configuring root project 'PassAndroid'.
> Could not resolve all dependencies for configuration
':_withMapsNoAnalyticsForPlayDebugCompile'.
> Could not resolve com.android.support:support-v4:20.0.+.
Required by:
:PassAndroid:unspecified
> Failed to list versions for com.android.support:support-v4.
> Could not list versions using M2 pattern 'https://raw.github.com/ligi/ligis-mvn-repo/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'https://raw.github.com/ligi/ligis-mvn-repo/master/com/android/support/support-v4/'. Received status code 400 from server: Bad Request
> Could not resolve com.android.support:appcompat-v7:20.0.+.
Required by:
:PassAndroid:unspecified
> Failed to list versions for com.android.support:appcompat-v7.
> Could not list versions using M2 pattern 'https://raw.github.com/ligi/ligis-mvn-repo/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'https://raw.github.com/ligi/ligis-mvn-repo/master/com/android/support/appcompat-v7/'. Received status code 400 from server: Bad Request
> Could not find com.google.android.gms:play-services:5.0.77.
Required by:
:PassAndroid:unspecified
here the full output: https://travis-ci.org/ligi/PassAndroid
Related
Android project failed during a build.
Could not determine the dependencies of task ':debug:compileDevelopDebugKotlin'.
Could not resolve all files for configuration ':debug:kotlinCompilerClasspath'.
Could not download kotlin-script-runtime-1.5.10.jar (org.jetbrains.kotlin:kotlin-script-runtime:1.5.10)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-script-runtime/1.5.10/kotlin-script-runtime-1.5.10.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-script-runtime/1.5.10/kotlin-script-runtime-1.5.10.jar'. Received status code 502 from server: Bad Gateway
I have installed Android studio in Mac when i try to create new project it is not building for Kotlin and Java both languages.
Bellow exception is for Java project.
Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'SampleJavaApp'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:80)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:73)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$600(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject$1.run(LifecycleProjectEvaluator.java:109)
at org.gradle.internal.Factories$1.create(Factories.java:26)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:238)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:232)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:193)
at
Bellow exception Kotlin
* What went wrong:
A problem occurred configuring root project 'SampleApplication'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-gradle-plugin-1.4.0.jar (org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.0/kotlin-gradle-plugin-1.4.0.jar'.
> Could not GET Received status code 403 from server: OK
Could not download tink-1.3.0-rc2.jar (com.google.crypto.tink:tink:1.3.0-rc2)
Received status code 403 from server: OK
Could not download protobuf-java-3.10.0.jar (com.google.protobuf:protobuf-java:3.10.0)
> Could not get resource 'https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.jar'.
> Could not GET
from server: OK
Could not download kotlin-annotation-processing-gradle-1.4.0.jar (org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.4.0)
> Could not get resource
I have used proxy settings which are working fine i have downloaded one project it is working fine.I have try all available solutions in google and SO.
I have been running this react-native project on my android device and it has been working without any problems till yesterday.
Today when I run react-native run-android I am getting this following error:
> Task :app:preDebugBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.facebook.react:react-native:0.20.+.
Required by:
project :app > project :react-native-charts-wrapper
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.facebook.react:react-native:0.12.+.
Required by:
project :app > project :react-native-i18n
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml'. Received status code 403 from server: Forbidden
Since it is a 403 I tried using a different Internet Connection and even a VPN , but it still is giving me the same error. Even my colleague is getting the same error.
This is the dependency on my build.gradle file : implementation "com.facebook.react:react-native:+"
Are other people also facing this issue?
Wonder why this is happening and how can I solve this?Thanks!
Got it to work by changing http to https at:
maven {
url "https://repo.spring.io/libs-release/"
name 'Spring Libs'
}
Weird though since it had no issue till a day ago. Lol
We are using Realm as our DB framework for Android. Current working version is 5.14.0. Yesterday we tried upgrading to 6.0.2 and gradle sync failed. I then pushed back the versions and saw that starting from 5.15.0 Realm causes gradle sync to fail with errors:
ERROR: Failed to resolve: io.realm:realm-android-library:5.15.0
ERROR: Failed to resolve: io.realm:realm-annotations:5.15.0
and a few other dependencies failing with the same exact error (but these might be affected by the first fail)
When I tried version 5.14 again, I got no errors and every thing was fine.
I checked the gradle build log and I could see this line appearing MANY times:
WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
And a few like these:
WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'project.name' is disabled because the project doesn't contain any valid native configurations.
and some:
INFO - ty.VersionCompatibilityChecker - Failed to find version reader for component 'android-gradle-experimental-plugin'
one of these:
INFO - pl.ProjectRootManagerComponent - project roots have changed
and eventually:
INFO - e.project.sync.GradleSyncState - Gradle sync failed (50 s 766 ms)
It looks like the sync starts SYNC_TASK_CREATED, some libraries download and then SETUP_STARTED. It then fails almost right away.
Does anyone have any idea what is going on here and maybe possible reasons why this might fail? I can add any extra info you may need.
Thanks.
EDIT:
I just ran ./gradlew check --stacktrace to get some more info on what is causing the issue and I get this:
Could not determine the dependencies of task ':app-name:testProdReleaseUnitTest'.
> Could not resolve all task dependencies for configuration ':app-name:prodReleaseUnitTestRuntimeClasspath'.
> Could not find io.realm:realm-android-library:5.15.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find io.realm:realm-android-library:5.15.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://dl.google.com/dl/android/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://jitpack.io/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://maven.fabric.io/public/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://github.com/uPhyca/stetho-realm/raw/master/maven-repo/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- http://maven.batch.com/release/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.pom
- https://repo.maven.apache.org/maven2/io/realm/realm-android-library/5.15.0/realm-android-library-5.15.0.jar
Ok that was stupid.
I really should give the error messages more credit...
I added
mavenLocal()
jcenter()
to
allprojects {
repositories {
}
in the root build.gradle file and now it found the Realm repo. Hehe.
Thanks to all the viewers of this question.
I got an old running project that when built shows dependency error.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-mqtt-iot'.
Could not resolve all dependencies for configuration ':react-native-mqtt-iot:_debugPublishCopy'.
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Required by:
project :react-native-mqtt-iot
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Could not get resource 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'.
Could not GET 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'. Received status code 410 from server: Gone
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Could not get resource 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_ibchat/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'.
Could not GET 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_ibchat/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'. Received status code 410 from server: Gone
Is it because of change of api version from 1.0 to 2.0? If so how to fix it?
Okay so I got the solution to fix.
In my case i change the url from https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom
to
https://api.bitbucket.org/2.0/repositories/mumsnbabies/maven_awsiot/src/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom
And adding the following lines of code before the url:
authentication {
basic(BasicAuthentication)
}