您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Google material design library错误程序类型已经存在:android.support.v4.app.INotificationSideChannel$Stub$Proxy

Google material design library错误程序类型已经存在:android.support.v4.app.INotificationSideChannel$Stub$Proxy

我也整天都在努力解决这个问题。最终,我成功地编译并运行了该项目。

首先,摆脱这一点:

implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'

在gradle.properties文件添加以下内容

android.useandroidX = true
android.enableJetifier = false

最后,同步项目,然后进行编译。

如果不起作用,请清理项目,然后重新生成

PS:我无法使targetSdkVersion’p’正常工作。我的build.gradle文件最终如下:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 'android-P'
    defaultConfig {
        applicationId "com.github.alvarosct02.demo"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.google.android.material:material:1.0.0-alpha1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

希望它也对你有用。

Go 2022/1/1 18:24:53 有309人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶