1

I have a <receiver> in AndroidManifest that I only want register when I build in debug buildType. I want "disable it" when I build in release mode.

Is that possible? At this moment, I have to comment/uncomment that part of AndroidManifest and it is pretty tedious.

I will appreciate any help. Thanks.

Héctor
  • 24,444
  • 35
  • 132
  • 243
  • 1
    check my answer here http://stackoverflow.com/questions/28478110/android-studio-two-flavors-with-different-manifest-files/28480064#28480064 it's meant to remove a `permission` from the manifest, but I'm sure you can use the same technique to remove a `receiver` – Budius Jan 12 '16 at 10:47
  • Thank you. I will try it. Just one question: can I use buildType instead of product flavours? – Héctor Jan 12 '16 at 11:00
  • 1
    I would imagine yes. Hence a comment and not a direct answer. You test and let us know :) – Budius Jan 12 '16 at 11:01

0 Answers0