Приложение падает при установке из магазина Google Play - PullRequest
0 голосов
/ 16 января 2020

Ниже приведена ошибка

FATAL EXCEPTION: main
Process: com.example.myapp, PID: 23564
android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.coordinatorlayout.widget.CoordinatorLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.coordinatorlayout.widget.CoordinatorLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.coordinatorlayout.widget.CoordinatorLayout" on path: DexPathList[[zip file "/data/app/com.example.myapp-NCewvyoi2h2F2Z1UfLtpjw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.myapp-NCewvyoi2h2F2Z1UfLtpjw==/lib/arm, /system/lib, /vendor/lib]]

Я использую androidx Ниже buid.gradle(Module:app)

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'


android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.example.myapp"
    minSdkVersion 21
    targetSdkVersion 28
    versionCode 5010002
    versionName "1.0.02-beta"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {

       shrinkResources true
       minifyEnabled true
       proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation 'androidx.appcompat:appcompat:1.0.2'
  implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'androidx.test:runner:1.2.0'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

  ///https://github.com/AppIntro/AppIntro
  implementation 'com.github.AppIntro:AppIntro:5.1.0'

  implementation 'com.android.volley:volley:1.1.1'

  implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'       
  //https://github.com/cachapa/ExpandableLayout

  implementation 'com.github.krtkush:LinearTimer:v2.1.1'      
  //https://github.com/krtkush/LinearTimer

  implementation 'com.facebook.shimmer:shimmer:0.4.0'   
  //https://github.com/team-supercharge/ShimmerLayout

  implementation 'com.google.firebase:firebase-core:17.1.0'
  implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

  implementation 'com.github.aabhasr1:OtpView:v1.1.2'   // 
    https://github.com/aabhasr1/OtpView
}

apply plugin: 'com.google.gms.google-services'

Приложение работало нормально при установке из Android studio. Вылетает после установки из магазина приложений

1 Ответ

3 голосов
/ 16 января 2020

Пожалуйста, попробуйте ввести следующий код в ваш файл Gradle:

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'
...