【问题标题】:If I run application , I am suddenly getting this error , what is the problem?如果我运行应用程序,我突然收到这个错误,是什么问题?
【发布时间】:2019-11-21 20:40:10
【问题描述】:

多个dex文件定义Landroid/support/v4/app/INotificationSideChannel$Stub(error)

【问题讨论】:

    标签: android kotlin


    【解决方案1】:

    在 defaultConfig 或特定构建中启用 multiDex

     defaultConfig {
        ...
    
        multiDexEnabled true
    
    }
    

    如果你使用的是androidx,请添加以下依赖

    dependencies {
    def multidex_version = "2.0.1"
    implementation 'androidx.multidex:multidex:$multidex_version'}
    

    如果你没有使用 androidx,或者下面的支持库

    dependencies {
    
    implementation 'com.android.support:multidex:1.0.3'
    
    }
    

    以下文档中给出的详细信息和参考

    https://developer.android.com/studio/build/multidex

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-11
      • 1970-01-01
      • 1970-01-01
      • 2014-01-10
      • 2021-05-04
      • 1970-01-01
      相关资源
      最近更新 更多