gpt4 book ai didi

android - 找不到方法 androidExtensions()

转载 作者:太空宇宙 更新时间:2023-11-03 12:44:05 25 4
gpt4 key购买 nike

我想使用kotlin @Parcelize的特性,我在 gradle 上应用了插件:'kotlin-android-extensions',我添加了

androidExtensions { 
experimental = true
}

但错误继续出现。此错误消息:

Error:(28, 0) Could not find method androidExtensions() for arguments [build_8di01fmxa4d18k9q0yy3fdd20$_run_closure2@27f46852] on project ':app' of type org.gradle.api.Project.
<a href="openFile:F:\BELAJAR\ANDROID\AndroidStudioProjects\KADE\app\build.gradle">Open File</a>

最佳答案

  • 使用最新版本的 Kotlin (>= v1.1.51)
  • 在您的应用模块中使用最新版本的 Kotlin Android 扩展,所以你的 build.gradle 可能看起来像:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
androidExtensions {
experimental = true
}
}

dependencies {
// ...
}

关于android - 找不到方法 androidExtensions(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52902720/

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