Debugging The Release Build Type Without Generating a Signed APK
<p>I have a project setup with two build types: <code>debug</code> and <code>release</code>.</p>

<p>In my app module I have three different directories: <code>debug</code>, <code>release</code> and <code>main</code>.</p>

<p>What I want to do is test the code in the <code>release</code> directory but the only way I can seem to do that is to generate a signed apk and load it onto an emulator that way. This means I can't debug it correctly.</p>

<p>When I change my <code>app</code> module's build variant to <code>release</code> I get the following error in the "Edit Configuration" popup.</p>

<blockquote>
  <p>Error: The apk for your currently selected variant
  (app-release-unsigned.apk_ is not signed. Please specify a signing
  configuration for this variant (release).</p>
</blockquote>

<p>What I was hoping to do was extend the <code>release</code> build variant with one called <code>debugRelease</code> in the <code>build.gradle</code> file of the <code>app</code> module which would then inherit the code in the <code>release</code> directory but I would be able to run it from within the IDE.</p>

<p>I may be looking at this the wrong way and I would be glad to hear any other techniques.</p>

<p>Can I do what I'm trying to do? If not what is the best solution for this?</p>