Android gradle sync failed with the newer version
Is there a compatibility issue with the newer gradles?
I created a new android Rainbow project with the following newer gradle versions but it failed as "unsolved com.ale:rainbowsdk:2.7.1".
Android gradle plugin version 7.0.3
Gradle version 7.0.2
I then downgraded the gradels to the following older ones that I had used for the previous android app then the sync successfully finished.
Android gradle plugin version 4.0.0
Gradle version 6.1.1
-
Official comment
Hello,
With newer gradle versions you can add the openrainbow repository like this :
// Inside settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://maven.openrainbow.io" }
}
}// Then the dependencies inside build.gradle
dependencies {
implementation 'com.ale:rainbowsdk:2.7.3'
...
}Comment actions -
I followed the instruction in Rainbow API Hub, added lines to my project/build.gradle and app/build.gradle.
When I hit SyncNow then got this error, "Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file.."I then moved the line "maven {url "http://maven.openranibow.io"} to settings.gradle, inside the repositories section of the file. But got other errors.
I googled the errors and found a possible solution that replacing the RepositoriesMode line in the settings.gradle with RepositoriesMode.PREFER_SETTINGS. This modification solved the above sync errors but failed to resolve com.ale:rainbowsdk:2.7.1. I tried other sdk versions such as com.ale:rainbowsdk:1.72.0 but got the same result.
Please sign in to leave a comment.
Comments
3 comments