1:在project structure ->Dependencise 选择 app 点击 加号(+) 依赖库加入'androidx.legacy:legacy-support-v4:1.0.0'
2:在 build.gradle 添加
dependencies {
classpath 'androidx.legacy:legacy-support-v4:1.0.0'
}
3.import android.support.v4.content.LocalBroadcastManage改成
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
编译通过
本文详细介绍了如何在Android项目中解决从support库迁移到AndroidX的问题,包括在项目结构中添加依赖、修改Gradle配置以及更新导入语句的方法。
832

被折叠的 条评论
为什么被折叠?



