https://kotlinlang.org logo
#compose
Title
# compose
r

redrield

11/14/2020, 3:07 AM
Copy code
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.redrield.androidds, PID: 15301
    java.lang.NoSuchFieldError: No field Companion of type Landroidx/compose/runtime/SlotTable$Companion; in class Landroidx/compose/runtime/SlotTable; or its superclasses (declaration of 'androidx.compose.runtime.SlotTable' appears in /data/app/~~58hYPPzhGRjb56GwSeeO0g==/com.redrield.androidds-WjdLhG2Oom4gM1SnqQGjqg==/base.apk)
        at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:112)
Any idea why this would be happening? It started after I added compose-navigation, even if I've cut out all reference to it where the theme composable is being called, in fact there's no content there at all
b

Bradleycorn

11/14/2020, 3:12 AM
All of a sudden I’m getting the same thing.
I don’t think it’s Navigation related. I removed Navigation entirely, and now I get it on
MaterialTheme
If I do this in my activity:
Copy code
setContent { 
    Text(text = "Hello World")
}
The app runs fine. but if I do this:
Copy code
setContent {
    MaterialTheme {
        Text(text = "Hello World")
    }
}
I get the error. It’s worth noting, that I updated to 1.0.0-alpha07 … I’ve tried downgrading back to alpha06, but I’m still getting this issue?
r

redrield

11/14/2020, 5:22 AM
It seems related to nav to me, completely removing the dependency made it work again
nav alpha01 seems to launch
b

Bradleycorn

11/14/2020, 1:36 PM
Odd … I removed Navigation all together and I still get the issue. Now it shows on MaterialTheme …. java.lang.NoSuchFieldError: No field Companion of type Landroidx/compose/runtime/SlotTable$Companion; in class Landroidx/compose/runtime/SlotTable; or its superclasses (declaration of ‘androidx.compose.runtime.SlotTable’ appears in /data/app/com.kysportsblogs.android-G1q_mSMF0wWD4JFpTJq_1Q==/base.apk) at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:112) at com.kysportsblogs.android.MainActivityKt.TestScreen(MainActivity.kt:32) at com.kysportsblogs.android.MainActivity$onCreate$1.invoke(MainActivity.kt:25) at com.kysportsblogs.android.MainActivity$onCreate$1.invoke(Unknown Source:10)