Monday, 11 August 2014

How to suppress android xml new api error



I am developing an app with min api 5. The switch layout widget was added in api 14. I am trying to use 2 different layout files. One for api 5 to 13 and one for 14 and up. When I add a switch to the layout for 14 and up it gives me an error.



View requires API level 14 (current min is 5): Switch



This makes it impossible to compile and run the app. How do I suppress this error in the xml layout file?


No comments:

Post a Comment