Why Android Studio Cannot Attach the Debugger
The message build type isn't debuggable usually means the selected module is using a non-debuggable release variant.
Select the Debug Build Variant
Open the Build Variants tool window, locate the module, and change its active variant from release to debug.