So anyone know why on earth the compose inspector ...
# compose
v
So anyone know why on earth the compose inspector is CRASHING my app? I launch it and it just crashes my app, I make sure the application overlays with composables are visible before launching it. This feature is pretty useless tbh if it just crashes the app, any way to make it not do that?
y
Raise a bug with a stacktrace.
v
Copy code
FATAL EXCEPTION: Studio:LayInsp
                                                                                                    Process: com.example.voicemailreader, PID: 15928
                                                                                                    java.lang.UnsupportedOperationException: Tried to obtain display from a Context not associated with one. Only visual Contexts (such as Activity or one created with Context#createWindowContext) or ones created with Context#createDisplayContext are associated with displays. Other types of Contexts are typically related to background entities and may return an arbitrary display.
                                                                                                    	at android.app.ContextImpl.getDisplay(ContextImpl.java:2826)
                                                                                                    	at android.content.ContextWrapper.getDisplay(ContextWrapper.java:1098)
                                                                                                    	at com.android.tools.agent.appinspection.proto.ViewExtensionsKt.getDefaultDisplay(ViewExtensions.kt:255)
                                                                                                    	at com.android.tools.agent.appinspection.proto.ViewExtensionsKt.isRunningInMainDisplay(ViewExtensions.kt:203)
                                                                                                    	at com.android.tools.agent.appinspection.proto.ViewExtensionsKt.createAppContext(ViewExtensions.kt:154)
                                                                                                    	at com.android.tools.agent.appinspection.CaptureExecutor.sendLayoutEvent(CaptureExecutor.kt:173)
                                                                                                    	at com.android.tools.agent.appinspection.CaptureExecutor.executeCapture(CaptureExecutor.kt:145)
                                                                                                    	at com.android.tools.agent.appinspection.CaptureExecutor.access$executeCapture(CaptureExecutor.kt:42)
                                                                                                    	at com.android.tools.agent.appinspection.CaptureExecutor$execute$1.run(CaptureExecutor.kt:75)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
Also why does this only work for my own app? Why cant I use this on another app?
125 Views