Top

Android gradle sync failed with the newer version

Comments

3 comments

  • Official comment
    Jordan HIERTZ

    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 Permalink
  • Hiro TAKAHASHI

    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. 

     

    0
    Comment actions Permalink
  • Hiro TAKAHASHI

    Got it, thank you Jordan!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Still can't find what you need?

  • Contact Us

    Do you have any question about Rainbow? Leave us a message to get more information.

    Contact
  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message