java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/app/ActivityManagerCompat

戏子无情 提交于 2019-12-04 03:57:57

In your gradle dependencies, do you use this?

implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"

If so, replace it with:

    implementation 'android.arch.persistence.room:runtime:1.1.1'
    annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'

you might be missing the dependency ...

 androidx.core:core:1.0.0

which provides androidx.core.app.ActivityManagerCompat.

Try migrating the project to AndroidX according to steps given in the link "https://developer.android.com/jetpack/androidx/migrate"

Change existing package and class names to those given in the sub-section "https://developer.android.com/jetpack/androidx/migrate#artifact_mappings"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!