由于我將我的 Android Studio 更新Bumblebee為專案級別的 build.gradle 檔案包含如下plugins塊:
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 插件的 Android Studio Bumblebee版本 7.0.0
請幫我添加依賴項。
uj5u.com熱心網友回復:
使用這一行:
id 'androidx.navigation.safeargs.kotlin' version '2.5.0-alpha01' apply false
- “類路徑...”在 Bumblebee 或更新版本中不起作用: https ://stackoverflow.com/a/70872516/3466808 https://stackoverflow.com/a/70857477/3466808
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/432343.html
