为什么将connectycube添加到android项目失败?

为什么将connectycube添加到android项目失败?,android,kotlin,connectycube,Android,Kotlin,Connectycube,我正在将Connectycube源添加到我的Android项目中,如下所示: 我在配置上做了如下所述的更改 整个项目的build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.3.61' repositories { google()

我正在将Connectycube源添加到我的Android项目中,如下所示:

我在配置上做了如下所述的更改

  • 整个项目的build.gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
      ext.kotlin_version = '1.3.61'
      repositories {
         google()
        jcenter()
         maven {
            url "https://github.com/ConnectyCube/connectycube-android-sdk-releases/raw/master/"
        }
     }
    dependencies {
    classpath 'com.android.tools.build:gradle:3.5.3'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
     }
     }
    
    allprojects {
     repositories {
       google()
       jcenter()
       maven {
          url "https://github.com/ConnectyCube/connectycube-android-sdk-releases/raw/master/"
       }
      }
     }
    
        task clean(type: Delete) {
          delete rootProject.buildDir
     }
    
  • 应用程序的build.gradle

    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    
    apply plugin: 'kotlin-android-extensions'
    
    android {
    compileSdkVersion 28
      defaultConfig {
        applicationId "com.example.app2"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
     buildTypes {
     release {
           minifyEnabled false
           proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard- rules.pro'
          }
       }
     }
    
      dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation 'androidx.core:core-ktx:1.1.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation("com.squareup.okhttp3:okhttp:4.3.1")
        testImplementation("com.squareup.okhttp3:mockwebserver:4.3.1")
        implementation 'com.fasterxml.jackson.core:jackson-core:2.10.2'
        implementation 'com.fasterxml.jackson.core:jackson-annotations:2.10.2'
        implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.2'
        implementation("ru.gildor.coroutines:kotlin-coroutines-okhttp:1.0")
        implementation 'com.github.kittinunf.fuel:fuel:2.2.1' //Core package
        implementation 'com.github.kittinunf.fuel:fuel-android:2.2.1' //Android
        implementation 'com.github.kittinunf.fuel:fuel-gson:2.2.1' //Fuel Gson
        implementation 'com.google.code.gson:gson:2.8.6' //Gson
    
       implementation "com.connectycube:connectycube-android-sdk-chat:1.8.1"
       implementation "com.connectycube:connectycube-android-sdk-videochat:1.8.1"
       implementation "com.connectycube:connectycube-android-sdk-storage:1.8.1"
       implementation "com.connectycube:connectycube-android-sdk-pushnotifications:1.8.1"
    
      testImplementation 'junit:junit:4.13'
      androidTestImplementation 'androidx.test.ext:junit:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
     }
    
该项目建设良好。然而,当运行应用程序时,应用程序立即崩溃,我现在得到以下错误,而在它正常运行之前:

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.example.app2-GGFjPULxWAFkxuGr2o1VpA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.app2-GGFjPULxWAFkxuGr2o1VpA==/lib/x86, /data/app/com.example.app-GGFjPULxWAFkxuGr2o1VpA==/base.apk!/lib/x86, /system/lib, /vendor/lib]]

使用Galaxy Nexus API 27作为模拟器修复了它。显然,Nexus5x上的API 26并没有与之协同工作