问题
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.1.0-runtime (androidx.core:core:1.1.0) and support-compat-27.1.1-runtime (com.android.support:support-compat:27.1.1)
Go to the documentation to learn how to Fix dependency resolution errors.
解决
在文件 gradle.properties (根目录下的) 写入内容:
android.enableJetifier=true
android.useAndroidX=true