AppLovin / AppLovin-MAX-Ad-Review-SDK-Android

2 stars 0 forks source link

applovin-quality-service plugin causes `IncompatibleClassChangeError` errors with Compose #1

Closed SimpsOff closed 1 year ago

SimpsOff commented 1 year ago

We started adding Compose 1.4 to our apps and we were hitting a strange error:

java.lang.IncompatibleClassChangeError: Found interface androidx.compose.ui.graphics.drawscope.DrawScope, but class was expected

A very simple piece of Compose code that reproduces the issue is:

LazyColumn {
        items(
            items = listOf(1, 2, 3),
        ) {
            Text(text = it.toString())
            Divider()
        }
    }

After some digging, we found this in google's issue tracker:

https://issuetracker.google.com/issues/236299800#comment3

We can confirm that disabling the android-quality-service plugin stops the error from happening. For now we are disabling the quality service plugin until this is resolved.

Please look into this so we can re-enable the android-quality-service plugin.

SDK Version Details:

classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:4.3.7"

// Compose
def composeBom = platform('androidx.compose:compose-bom:2023.01.00')
implementation composeBom
androidTestImplementation composeBom
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.ui:ui-tooling-preview'
debugImplementation 'androidx.compose.ui:ui-tooling'
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
implementation 'androidx.activity:activity-compose:1.7.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1'
implementation 'androidx.compose.runtime:runtime-livedata'

// Ads
implementation "com.applovin:applovin-sdk:11.5.5"
SimpsOff commented 1 year ago

Oh man, okay i feel a bit silly.

Upgrading the com.applovin.quality:AppLovinQualityServiceGradlePlugin version from our outdated 4.3.7 to the latest 4.9.3 fixed the problem for us.