Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IncompatibleClassChangeError: Class 'java.util.ArrayList' does not implement interface 'od.a' in call to 'java.util.Iterator od.a.iterator()' (declaration of 'com.google.firebase.components.ComponentRuntime' appears in /data/app/com.android.notification.firebase/base.apk!classes2.dex) #1581

Open
fajaranugrah opened this issue Jan 23, 2024 · 1 comment

Comments

@fajaranugrah
Copy link

  • Android device: All device
  • Android OS version: All device
  • Google Play Services version: 4.4.0
  • Firebase/Play Services SDK version: 32.7.1

Step 2: Describe the problem:

i get error from console playstore
java.lang.IncompatibleClassChangeError: Class 'java.util.ArrayList' does not implement interface 'od.a' in call to 'java.util.Iterator od.a.iterator()' (declaration of 'com.google.firebase.components.ComponentRuntime' appears in /data/app/com.android.notification.firebase/base.apk!classes2.dex)

Exception java.lang.IncompatibleClassChangeError: Class 'java.util.ArrayList' does not implement interface 'od.a' in call to 'java.util.Iterator od.a.iterator()' (declaration of 'com.google.firebase.components.ComponentRuntime' appears in /data/app/com.android.notification.firebase//base.apk!classes2.dex)
at com.google.firebase.components.ComponentRuntime.iterableToList (ComponentRuntime.java:1)
at com.google.firebase.components.ComponentRuntime. (ComponentRuntime.java:1)
at com.google.firebase.components.ComponentRuntime. (ComponentRuntime.java:2)
at com.google.firebase.components.ComponentRuntime$Builder.build (ComponentRuntime.java)
at com.google.firebase.FirebaseApp. (FirebaseApp.java:189)
at com.google.firebase.FirebaseApp.initializeApp (FirebaseApp.java:3)
at com.google.firebase.FirebaseApp.initializeApp (FirebaseApp.java:2)
at com.google.firebase.FirebaseApp.initializeApp (FirebaseApp.java:1)
at com.google.firebase.provider.FirebaseInitProvider.onCreate (FirebaseInitProvider.java)
at android.content.ContentProvider.attachInfo (ContentProvider.java:2451)
at android.content.ContentProvider.attachInfo (ContentProvider.java:2421)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo (FirebaseInitProvider.java)
at android.app.ActivityThread.installProvider (ActivityThread.java:7508)
at android.app.ActivityThread.installContentProviders (ActivityThread.java:7019)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6790)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2132)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:201)
at android.os.Looper.loop (Looper.java:288)
at android.app.ActivityThread.main (ActivityThread.java:7918)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936)

my app/build.gradle

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'dagger.hilt.android.plugin'
}

android {
    namespace 'com.android.notification.firebase'
    compileSdk 34

    defaultConfig {
        applicationId "com.android.notification.firebase"
        minSdk 21
        targetSdk 34
        multiDexEnabled true
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        debug {
            //shrinkResources true
            //minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            //signingConfig signingConfigs.release
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = '11'
    }
    buildFeatures {
        buildConfig true
        viewBinding true
    }
    signingConfigs {
        debug {
            v1SigningEnabled true
            v2SigningEnabled true

            enableV3Signing = true
            enableV4Signing = true
        }

        release {
            v1SigningEnabled true
            v2SigningEnabled true

            enableV3Signing = true
            enableV4Signing = true
        }
    }
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KaptGenerateStubs).configureEach {
    kotlinOptions {
        jvmTarget = "11"
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.7.6'
    implementation 'androidx.navigation:navigation-ui-ktx:2.7.6'
    implementation 'androidx.activity:activity-ktx:1.8.2'

    // SharedPreferences
    implementation 'androidx.preference:preference-ktx:1.2.1'

    // Dagger hilt
    implementation 'com.google.dagger:dagger-android-support:2.46.1'
    implementation 'com.google.dagger:hilt-android:2.46.1'
    kapt 'com.google.dagger:hilt-android-compiler:2.46.1'

    // Room Database
    implementation 'androidx.room:room-runtime:2.6.1'
    implementation 'androidx.room:room-ktx:2.6.1'
    kapt 'androidx.room:room-compiler:2.6.1'

    // Retrofit Network
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    // define a BOM and its version
    implementation(platform('com.squareup.okhttp3:okhttp-bom:5.0.0-alpha.11'))
    // define any required OkHttp artifacts without version
    implementation("com.squareup.okhttp3:okhttp")
    implementation("com.squareup.okhttp3:logging-interceptor")

    // Glide
    implementation 'com.github.bumptech.glide:glide:4.15.1'

    // Coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.2'

    // Multidex
    implementation 'androidx.multidex:multidex:2.0.1'

    // Import the BoM for the Firebase platform
    implementation(platform('com.google.firebase:firebase-bom:32.7.1'))

    // Declare the dependencies for the Firebase Cloud Messaging and Analytics libraries
    // Declare the dependencies for the Crashlytics and Analytics libraries
    // When using the BoM, you don't specify versions in Firebase library dependencies
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-messaging'

    // SMS Phone
    implementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1'

    // In -app Updates
    implementation 'com.google.android.play:core:1.10.3'

    // Google
    implementation 'com.google.android.gms:play-services-base:18.3.0'

    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
}

kapt {
    correctErrorTypes true
    includeCompileClasspath false
}

hilt {
    enableAggregatingTask true
}

my project/build.gradle

plugins {
    id 'com.android.application' version '8.2.1' apply false
    id 'com.android.library' version '8.2.1' apply false
    id 'com.google.dagger.hilt.android' version '2.46' apply false
    id 'org.jetbrains.kotlin.android' version '1.9.20' apply false
    id 'com.google.gms.google-services' version '4.4.0' apply false
    id 'com.google.firebase.crashlytics' version '2.9.9' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

use Android Studio Hedgehog | 2023.1.1 Patch 1
how to fixed this issue the problem after upload on console playstore problem but if i running from emulator pixel 7 its okay
i think this problem after build .aab meaning (generate signed bundle)

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants