twilio / twilio-java

A Java library for communicating with the Twilio REST API and generating TwiML.
MIT License
482 stars 421 forks source link

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/~~aI47uWzBF3uT3OZtg8KZQg==/package-ZUq4Gk_s3MKZxndWyHubrw==/base.apk"],nativeLibraryDirectories=[/data/app/~~aI47uWzBF3uT3OZtg8KZQg==/package-ZUq4Gk_s3MKZxndWyHubrw==/lib/arm64, /data/app/~~aI47uWzBF3uT3OZtg8KZQg==/package-ZUq4Gk_s3MKZxndWyHubrw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]] #700

Closed altaf2892 closed 2 years ago

altaf2892 commented 2 years ago
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/~~aI47uWzBF3uT3OZtg8KZQg==/package-ZUq4Gk_s3MKZxndWyHubrw==/base.apk"],nativeLibraryDirectories=[/data/app/~~aI47uWzBF3uT3OZtg8KZQg==/package-ZUq4Gk_s3MKZxndWyHubrw==/lib/arm64, /data/app/~~aI47uWzBF3uT3OZtg8KZQg==/package-ZUq4Gk_s3MKZxndWyHubrw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]]

I m facing this issue after upgrading library. older version working fine but the new version creating issue please check build file

build file

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

android {
    compileSdkVersion 32
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId ""
        minSdkVersion 23
        targetSdkVersion 32
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    lintOptions{
        checkReleaseBuilds false
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            multiDexKeepFile file('multidex-config.txt')
        }
    }
    dataBinding {
        enabled = true
    }

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
      //  coreLibraryDesugaringEnabled true
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
        exclude("META-INF/*.kotlin_module")
    }
}

dependencies {
    implementation platform('com.google.firebase:firebase-bom:30.2.0')
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.github.dhaval2404:imagepicker:2.1'
    implementation 'com.github.markomilos:paginate:1.0.0'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.4.2'
    implementation 'com.android.support:support-compat:32.0.0'
    implementation 'androidx.core:core-ktx:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:2.2.0-alpha03'
    implementation 'com.google.android.material:material:1.6.1'
    implementation 'androidx.navigation:navigation-fragment:2.0.0'
    implementation 'androidx.navigation:navigation-ui:2.0.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.0.0'
    implementation 'androidx.navigation:navigation-ui-ktx:2.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'

    implementation 'com.google.android.gms:play-services-maps:18.0.2'
    implementation 'com.google.maps.android:android-maps-utils:0.5'
/*    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'*/

    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

    implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
    implementation 'com.chaos.view:pinview:1.4.3'
    implementation 'com.google.firebase:firebase-messaging-ktx'
    implementation 'com.google.firebase:firebase-crashlytics-ktx'

    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

    implementation 'com.intuit.sdp:sdp-android:1.1.0'
    implementation 'com.intuit.ssp:ssp-android:1.1.0'

    // Kotlin Coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4'

    //Anko design for Kotlin
    implementation 'org.jetbrains.anko:anko-commons:0.10.8'
    implementation 'org.jetbrains.anko:anko-design:0.10.8'

    //Lifecycle Components
    implementation "androidx.lifecycle:lifecycle-extensions:2.0.0"
    kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"

    implementation 'com.google.android.libraries.places:places:2.6.0'
    //Work manager for background tasks
    // Kotlin + coroutines
    implementation "androidx.work:work-runtime-ktx:$rootProject.work_version"
    // optional - RxJava2 support
    implementation "androidx.work:work-rxjava2:$rootProject.work_version"
    //Room version
    implementation "androidx.room:room-runtime:2.1.0-alpha06"
    kapt "androidx.room:room-compiler:2.1.0-alpha04"
    implementation "androidx.room:room-coroutines:2.1.0-alpha04"
    //   implementation project(path: ':custom_calendar')
    implementation 'com.github.sheetalkumar105:ZoomImageView-android:1.02'
    implementation "androidx.exifinterface:exifinterface:1.2.0"
    implementation 'io.agora.rtc:full-sdk:3.1.1'
    implementation project(path: ':custom_calendar')

    implementation 'com.github.sundeepk:compact-calendar-view:3.0.0'

    //image cropper
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.3.+'

    /*//Twilio Video call
    implementation('com.twilio:video-android:5.13.0')
    //Twilio Voice call
    implementation('com.twilio:voice-android:5.1.1')*/

    //Twilio Video call
    implementation('com.twilio:video-android:7.1.1')
    //Twilio Voice call
    implementation('com.twilio:voice-android:6.1.1')

}

build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.5.10'
    repositories {
        google()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
        jcenter()
        maven { url 'https://jitpack.io' }

    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.3"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.13'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
        maven { url "https://maven.google.com" }
        maven { url 'https://jitpack.io' }

    }
}
ext {
    roomVersion = '2.1.0-alpha04'
    archLifecycleVersion = '2.0.0'
    coroutines = '1.1.0'
//    work_version = "2.2.0-beta02"
     work_version = "2.7.1"
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
childish-sambino commented 2 years ago

The only reference I see to Twilio is com.twilio:video-android which is not a part of this library. This is not a change that can be made in the library. Please file a support ticket for further help.