Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Question: Flipper layout inspector can't see any component #5682

Closed
duowanSir opened this issue Nov 8, 2024 · 2 comments
Closed

Question: Flipper layout inspector can't see any component #5682

duowanSir opened this issue Nov 8, 2024 · 2 comments

Comments

@duowanSir
Copy link

I wrote a very simple demo based on the onboarding/HelloWorldActivity code in litho(v2024.10.07)/sample, but I can't see any components when using flipper inspect.

This is my demo flipper screenshot
image

This is official demo flipper screenshot
image

I don't know why this happens, I need help,thank you!!!

@duowanSir
Copy link
Author

Code in my application:

`
class MagpieCardDemoApplication : Application() {

override fun onCreate() {
    super.onCreate()

    subscribe(DebugEventLogger())

    Fresco.initialize(this)
    FrescoVito.initialize()
    SoLoader.init(this, false)

    if (FlipperUtils.shouldEnableFlipper(this)) {
        val client = AndroidFlipperClient.getInstance(this)
        val uiDebuggerContext = create(this)
        enable(uiDebuggerContext)
        client.addPlugin(UIDebuggerFlipperPlugin(uiDebuggerContext))
        val descriptorMapping = DescriptorMapping.withDefaults()
        LithoFlipperDescriptors.add(descriptorMapping)
        client.addPlugin(InspectorFlipperPlugin(this, descriptorMapping))
        client.addPlugin(SectionsFlipperPlugin(true))
        client.start()
    }
}

}`

Code in my activity:
`
class MagpieCardDemoActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val utf8RichText = ""
val c = ComponentContext(this)
setContentView(LithoView.create(this, Text.create(c).text("Hello World!").build()))

}

}`

It's almost the same like sample, so do I lost some other key condition?

@duowanSir
Copy link
Author

I found it, I miss
ComponentsConfiguration.isDebugModeEnabled = true

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

No branches or pull requests

1 participant