【Android】The ‘kotlin-android-extensions‘ Gradle plugin is deprecated

The ‘kotlin-android-extensions’ Gradle plugin is deprecated

最近跑编译的时候,经常有个警告

The 'kotlin-android-extensions' Gradle plugin is deprecated. 
Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

意思是说kotlin-android-extensions已经废弃了,让我用kotlin-parcelize

build.gradle中需要如下修改:

apply plugin: 'kotlin-android'
//apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-parcelize'
failed The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin. :app:mergeDebugResources :app:mapDebugSourceSetPaths :app:checkDebugAarMetadata :app:processDebugMainManifest :app:javaPreCompileDebug :app:mergeDebugAssets :app:checkDebugDuplicateClasses :app:mergeDebugNativeLibs :app:dataBindingMergeDependencyArtifactsDebug :JetpackMvvm:compileDebugKotlin :JetpackMvvm:bundleLibRuntimeToJarDebug org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3) to match attributes {artifactType=android-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. org.gradle.internal.resolve.ArtifactNotFoundException: Could not find agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3). org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3) to match attributes {artifactType=android-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. org.gradle.internal.resolve.ArtifactNotFoundException: Could not find agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3). org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspa
最新发布
03-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值