android - 插件 'kotlin-parcelize' 未找到

标签 android kotlin gradle

Google 建议用户从 kotlin-android-extensions 迁移至kotlin-parcelize .
但是,Gradle 同步失败并出现以下错误:

Plugin [id: 'kotlin-parcelize'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/6.1.1/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (plugin dependency must include a version number for this source)
插件在哪里?

最佳答案

kotlin-parcelize附带 Kotlin 插件 1.4.20( Release Announcement : 弃用 Kotlin Android 扩展)
您需要升级 Kotlin 版本并再次运行 Gradle 同步。

dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20"
}

关于android - 插件 'kotlin-parcelize' 未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64981310/

相关文章:

php - Android xdebug phpstorm

android - SavedStateViewModelFactory 用空构造函数构造

android - Android Studio仅在选择“生成APK”时签名APK,而在单击“运行”按钮时不签名

java - 将 Kotlin 添加到现有 Java 项目会破坏 Android Studio gradle 消息错误

android - 将字符串数组从 SQLite 转换为整数数组

android - 如何在 BaseAdapter 中使用 Dialog?

android - ionic 覆盖CSS中的 Activity 元素

java - 安卓 : Navigate to another fragment

java - 通过 ID 分配两个数组

android - 需要 Gradle 版本 2.2。当前版本是 4.4 错误