I have the following code:
if(android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1){
enter_pos.callOnClick();
}
But I still get error from Lint:
Call requires API level 15 (current min is 12): android.widget.Button#callOnClick
Why Lint is still giving error even after I put a check for the API version? I am using
Android Developer Tools
Build: v22.0.5-757759
Under Windows 8. Thanks in advance for any suggestions!
You should put @SuppressLint("NewApi")
above the method you are using this. Lint cannot decide if you do your check right by looking at your code