如何将' https://jitpack.io库添加到Android Studio版本Bumble Bee?

发布于 2025-01-21 10:54:31 字数 208 浏览 3 评论 0原文

在Android Studio的最后版本中,我们可以简单地将库https://jitpack.io添加到gradle file> file> file(module project),但在最新更新中(android-studio bumble-bee ),该文件的结构已更改,我不知道如何添加此库。

In last versions of android studio we can simply add the library https://jitpack.io to the gradle file (module project) easily but in the newest update (android-studio-bumble-bee), the structure of this file has been changed and I don't know how to add this library.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

羁〃客ぐ 2025-01-28 10:54:31

对于 kotlin dsl 内部 settings.gradle.kts 文件,您可以使用setUrl()这样。

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
           setUrl("https://jitpack.io")
        }
    }
}

For Kotlin DSL inside settings.gradle.kts file you can use setUrl() just like this.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
           setUrl("https://jitpack.io")
        }
    }
}
腹黑女流氓 2025-01-28 10:54:31

中添加jitpack/maven {url“ https://jitpack.io”}

dependencyResolutionManagement {
    repositories {
        maven {
            url = uri("https://jitpack.io")
        }
    }
}

在settings.gradle.kts

implementation("com.github.pedroSG94.RootEncoder:library:2.4.3")

Add jitpack / maven { url "https://jitpack.io" } in settings.gradle.kts

dependencyResolutionManagement {
    repositories {
        maven {
            url = uri("https://jitpack.io")
        }
    }
}

and then add dependency build.gradle.kts

implementation("com.github.pedroSG94.RootEncoder:library:2.4.3")
淡莣 2025-01-28 10:54:31

您可以将其添加到settings.gradle以下方法:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' } // add it like this
    }
}

You can add it in your settings.gradle the following way:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' } // add it like this
    }
}
缘字诀 2025-01-28 10:54:31

您可以在项目设置中添加以寻找设置Gradle希望它能帮助“

you can added in the project settings look for settings gradle hope it helpslook the screenshot

悲歌长辞 2025-01-28 10:54:31

在模块级别build.gradle(不是应用程序级别)上

repositories{
    maven { url = "https://jitpack.io"}
}
...
dependencies {
    ...
    
}

On Module level build.gradle (not app level)

repositories{
    maven { url = "https://jitpack.io"}
}
...
dependencies {
    ...
    
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文