question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoSuchMethodError: No static method setContent

See original GitHub issue

I’m using 1.0.0-alpha08 version which is the same compose version as the library. Any ideas on how to solve it?

java.lang.NoSuchMethodError: No static method setContent$default(Landroidx/activity/ComponentActivity;Landroidx/compose/runtime/Recomposer;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Landroidx/compose/runtime/Composition; in class Landroidx/compose/ui/platform/WrapperKt; or its super classes (declaration of 'androidx.compose.ui.platform.WrapperKt' appears in /data/app/com.yektasarioglu.testapp.debug-ZwvsZzo9Jrsy4DLjhICVeg==/base.apk)
        at com.airbnb.android.showkase.ui.ShowkaseBrowserActivity.onCreate(ShowkaseBrowserActivity.kt:26)
        at android.app.Activity.performCreate(Activity.java:8085)
        at android.app.Activity.performCreate(Activity.java:8073)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3870)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4076)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
        at android.os.Handler.dispatchMessage(Handler.java:110)
        at android.os.Looper.loop(Looper.java:219)
        at android.app.ActivityThread.main(ActivityThread.java:8349)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

4reactions
igorwojdacommented, May 19, 2021

I am observing this as well with 1.0.0-beta07. This fixed the issue for me

// app Gradle file
android
{
	...
	buildFeatures {
    	compose true
	}
}
1reaction
vinaygabacommented, Dec 21, 2020

@yektasarioglu Okay let me take a deeper look at this and see if I can repro. Is the stack trace identical? Were you using any other compose libraries like navigation, paging, accompanist, etc?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android jetpack compose NoSuchMethodError: No static ...
I ran into the same issue. It worked for me after adding the following line in the app Gradle file buildFeatures { compose...
Read more >
Jetpack Compose doesn't work with MPP plugin ...
Jetpack compose is working fine with the id("kotlin-android") plugin but with id("org.jetbrains.kotlin.multiplatform") it throws at runtime:
Read more >
NoSuchMethodError: No static method setContent [195342732]
The cause of the error seems to be that the version of kotlin_dsl in buildSrc is not specified. buildSrc/build.gradle.kts plugins { `kotlin-dsl` }...
Read more >
Compose Runtime - Android Developers
java.lang.NoSuchMethodError: No interface method startReplaceableGroup(ILjava/lang/String;)V in class Landroidx/compose/runtime/Composer; ...
Read more >
Jetpack Compose异常:java.lang.NoSuchMethodError
NoSuchMethodError : No static method XXXTheme ... java.lang. ... WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:157).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found