Я добавляю источники Connectycube в мой проект Android, как указано здесь: 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]]