У меня есть эта проблема, составив мое приложение DEBUG в 4.4, в 8.1 функционируй верно.
Я прочитал много вопросов об этой ошибке, но меня не решает проблема, я не знаю, что делать, моей версии Андроид Студио 3.5, так что у него нет Инстант Рун
Caused by: java.lang. ClassNotFoundException: Didn't find class "com.google.firebase.provider. FirebaseInitProvider" on path: DexPathList [[zip file "/data/app/com.app-2.apk"], nativeLibraryDirectories = [/data/app-lib/com.app-2,/vendor/lib,/system/lib]]
Восток - мой gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.app"
minSdkVersion 17
targetSdkVersion 28
versionCode 35
versionName "4.3"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//google
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
//firebase
implementation 'com.google.firebase:firebase-ads:18.2.0'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-messaging:20.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
//otras
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.yarolegovich:discrete-scrollview:1.4.7'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3'
implementation 'com.mikhaellopez:circularprogressbar:1.1.1'
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
AndroidManifest:
<application
android:name=".utilidades.MyApplication"
MyApplication
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
MultiDex.install(this);
}
}
Осуществи mГ©todo attachBaseContext()
и ahГ - инициализирует способ multidex
public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
@Override
public void onCreate() {
super.onCreate();
// MultiDex.install(this);
}
}