Search code examples
androidandroid-strictmode

cannot import android.os.strictmode


on developing an android app with webservices. which uses :

     <uses-sdk android:minSdkVersion="8"
         android:targetSdkVersion="8" />

I am facing problem while importing import android.os.StrictMode; (it cannot be resolved) my code is giving me an exception "java.net.SocketException: Permission denied for android" because of this.if the strictmode is not supported in api 8 . what is the alternative for it?


Solution

  • Hey StrictMode Class was introduced in API Level 9 and your project target is API Level 8. Please Refer this link. So You are getting the error.