multidex Unable to get provider com.vivo.upgrade.library.provider.FileProvider

背景

集成一个斑马无线条码打印机,报了一堆错误

classes in a single dex file methods 67667 大于 65536

后来

Unable to get provider com.open.hule.library.downloadmanager.DownloadFileProvider

 

解决

defaultConfig {
applicationId "com.czszsoft.wms"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'com.android.support:multidex:1.0.3'
}

public class AppContext extends MultiDexApplication {
  @Override
  protected void attachBaseContext(Context base) {
  super.attachBaseContext(base);
  MultiDex.install(this);
  }
}
上一篇:Error:Unable to start the daemon process


下一篇:2021-05-30