8

Layout inspector live inspection stopped working when I upgraded my Android studio to Bumblebee 2021.1.1. Patch 2. It used to work before. It shows "Activity must be hardware accelerated for live inspection" I added hardwareAcceleration to true for my activity. But it didn't help. Did anybody notice this? enter image description here

Madhan
  • 361
  • 4
  • 17
  • refer https://developer.android.com/guide/topics/graphics/hardware-accel – Dark_Clouds_369 May 31 '22 at 07:56
  • I added `android:hardwareAccelerated="true"` to both activity and application level, still it didn't help. – Madhan Jun 13 '22 at 20:05
  • Seems like an issue with Bumblebee. Restarting my Android device and explicitly adding android:hardwareAccelerated="true" to manifest doesn't fix it (useless anyway, since these are implicitly enabled). I'm also using an Android device that's over API 29. – M.Ed Jun 14 '22 at 08:20
  • Right. I cleared my cache and restarted it worked for a while and then gone. – Madhan Jun 15 '22 at 21:38
  • 1
    I just encountered this in Electric Eel Canary 7 on a device on API 31. My project is targeting compileSdk & targetSdk 32. I restarted the IDE and it started working again. – Just The Highlights Jul 06 '22 at 23:24

1 Answers1

7

I had this problem with Android Studio Electric Eel (Canary) and adding the hardwareAccelerated tag to the manifest didn't work, but adding this to onCreate in the main activity did the trick:

    window.setFlags(
        WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
        WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
    )
RubenGM
  • 170
  • 1
  • 8
  • Thanks, adding it to the manifest didn't work for me, but this solved it. (Electric Eel Canary 10) – Leknesh Sep 22 '22 at 07:53