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

后端 未结 3 2495
無奈伤痛
無奈伤痛 2021-02-20 16:33

Description


I want to build todolist app.I want to store information using RoomDatabse. I build Database with room and get infomation than save to database. But

相关标签:
3条回答
  • 2021-02-20 17:06

    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"

    0 讨论(0)
  • 2021-02-20 17:17

    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'
    
    0 讨论(0)
  • 2021-02-20 17:26

    you might be missing the dependency ...

     androidx.core:core:1.0.0
    

    which provides androidx.core.app.ActivityManagerCompat.

    0 讨论(0)
提交回复
热议问题