title: Different flavors with GCM
body: <p>I have two flavors of my app, one debug and one release. The reason why these are different flavors is that I want to allow others to download the debug version to test out new features. So it should be possible to have both apps installed at once.</p>
  
  <p>My app uses GCM which has created some problems with the new security features in Android Lollipop.</p>
  
  <p>This is what I get when I have one flavor install, and try to install the other flavor:</p>
  
  <blockquote>
    <p>Failure [INSTALL_FAILED_DUPLICATE_PERMISSION
    perm=com.example.test.permission.C2D_MESSAGE pkg=com.example.test]</p>
  </blockquote>
  
  <p>I have tried to change the permission in the debug flavor by adding this to its Android Manifest:</p>
  
  <pre><code>&lt;permission
      android:name="com.example.test.debug.permission.C2D_MESSAGE"
      android:protectionLevel="signature" /&gt;
  &lt;uses-permission android:name="com.example.test.debug.permission.C2D_MESSAGE" /&gt;
  </code></pre>
  
  <p>But I still get the same error. Anyone know how to solve this?</p>