2

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!

1
  • sugestion, clean rebuild project. Commented Nov 6, 2013 at 15:12

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

0

In your eclipse Window -> preferences -> Android -> Lint error checking uncheck the two check boxes and apply changes and then clean the project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.