Actually I am trying to write an app having minSDKversion:8 and targetSDKversion:15 and I need to use
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
But its showing error
StrictMode cannot be resolved to a type
I am using 2.2 SDK to compile my app
SOLVED:
We need atleast 2.3 to import StrictMode
So reposting the answer:
“StrictMode is available starting with 2.3 so you can’t use it with 2.2”
Credits goes to Luksprog