gpt4 book ai didi

android - 如何在 Android Studio Bumblebee 中添加项目级依赖类路径

转载 作者:行者123 更新时间:2023-12-04 23:42:22 26 4
gpt4 key购买 nike

由于我在项目级别 build.gradle 文件中将我的 Android Studio 更新为 Bumblebee 包含 plugins block ,如下所示:

plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}
以前在顶级 build.gradle 文件中的存储库设置现在位于 settings.gradle 文件中。
通过此更改,我无法将新插件添加到我的应用程序中,我想将以下插件添加到我已添加到我的应用程序级别 build.gradle 的项目中。
apply plugin: 'kotlin-android-extensions'
apply plugin: "androidx.navigation.safeargs.kotlin"
为了完成这项工作,我需要在我的项目级别 build.gradle 中添加类路径,但是由于最近 build.gradle 结构发生了变化,我不确定如何在我的项目级别 build.gradle 中添加以下行
dependencies {

classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0"
}
我试图在 https://developer.android.com/studio/releases/gradle-plugin 中找到解决方案,但是我看不到任何解决方案,但是我知道此更改来自带有 gradle 插件版本 7.0.0 的 Android Studio Bumblebee
请帮我添加依赖项。

最佳答案

使用这一行:

id 'androidx.navigation.safeargs.kotlin' version '2.5.0-alpha01' apply false
  • "classpath..."在 Bumblebee 或更新版本中不起作用:
    https://stackoverflow.com/a/70872516/3466808
    https://stackoverflow.com/a/70857477/3466808
  • 关于android - 如何在 Android Studio Bumblebee 中添加项目级依赖类路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71239432/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com