Code Monkey home page Code Monkey logo

Comments (6)

Vitaliy69 avatar Vitaliy69 commented on September 23, 2024 1

Haven't no time to read gradle documents. ))) With setting.gradle works fine! TIA. It should be added in READ.me I think. )

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024

I see your error outputs dose not contain the location of the jitpack repository. You may need to add a jitpack repository.

See here: https://github.com/aitsuki/SwipeMenuRecyclerView/blob/master/README.en.md#declaring-dependencies

from swipemenurecyclerview.

Vitaliy69 avatar Vitaliy69 commented on September 23, 2024

I made:

buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.3"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
    }
}

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

And got error:

Caused by: org.gradle.api.InvalidUserCodeException: Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle

If change to:

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.3"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
    }
}

got error:

Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.aitsuki:SwipeMenuRecyclerView:2.0.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom
       - https://repo.maven.apache.org/maven2/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom
       - https://jcenter.bintray.com/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom
     Required by:
         project :app

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024

In root build.gralde

allprojects {
    repositories {
         google()
         mavenCentral()
         maven { url 'https://jitpack.io' }
    }
}

In app/build.gralde

dependencies {
    implementation 'com.github.aitsuki:SwipeMenuRecyclerView:2.0.2'
}

I use above configuration, it work fine. Try it?

from swipemenurecyclerview.

Vitaliy69 avatar Vitaliy69 commented on September 23, 2024

The same error: Caused by: org.gradle.api.InvalidUserCodeException: Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle'. I used default created project from the latest Android Studio. Can't understand why it happens.

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024

In latest Androidstudio, you may need to add jitpack repository in setting.gradle. If there has a dependencyManager. You should read the gradle documents 😆

from swipemenurecyclerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.