0

I have a class marked with @TargetApi(21) attribute and that uses, well, API Level 21 classes. I don't invoke the class if the app is running on an older device. However, with Instant Run enabled, I cannot debug my app on say an API Level 18 device, because then the task app:transformClassesWithInstantRunForDebug fails. Running and debugging the app on API Level 21+ devices is no problem. What would be the solution? How to explain to Android Studio to ignore that file? I guess I've already did that with @TargetApi attribute...

Aleks N.
  • 6,051
  • 3
  • 42
  • 42

0 Answers0