Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes?

前端 未结 6 1379
刺人心
刺人心 2020-11-29 05:54

I am developing a news app but I am getting following errors in from gradle console

(androidx.core:core:1.0.1) and classes.jar (com.android.support:support-c         


        
6条回答
  •  青春惊慌失措
    2020-11-29 06:20

    You can add below lines into your gradle.properties file:

    android.useAndroidX=true
    android.enableJetifier=true
    

    Details:

    If you want to use androidx-namespaced libraries in a new project, you need to set the compile SDK to Android 9.0 (API level 28) or higher and set both of the mentioned Android Gradle plugin flags to true.

    android.useAndroidX: When this flag is set to true, the Android plugin uses the appropriate AndroidX library instead of a Support Library. The flag is false by default if it is not specified.

    android.enableJetifier: When this flag is set to true, the Android plugin automatically migrates existing third-party libraries to use AndroidX dependencies by rewriting their binaries. The flag is false by default if it is not specified.

提交回复
热议问题