How can I solve this error ? I do not understand the reason behind this error ?
code
devicePolicyManager.setCameraDisabled(demoDeviceAdmin, false);
setCameraDisabled() method is introduced in API level 14. Have a look at official documentation for it here. You should change the API level of your application, if you want to use this method.
setCameraDisabled()
API level 14