項(xiàng)目在android 6.0機(jī)器運(yùn)行正常阻星,換了華為手機(jī)Android4.4.4,報(bào)下列異常java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider"
經(jīng)一番網(wǎng)絡(luò)查找已添,改正后,運(yùn)行正常更舞,現(xiàn)記錄一下,以備以后項(xiàng)目糾錯(cuò):
在項(xiàng)目app/build.gradle下添加:
defaultConfig{multiDexEnabled true}
在自定義的Application中添加
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
? ? MultiDex.install(this);
}