1

I made the mistake of not taking into consideration of the API level of each method used in my code. So after coding 500 lines, I have no idea what is the highest Android API level I have used in my code.

Obviously, I hope I do not have to check through every single line of method for its API level so I am wondering is there an option in Eclipse to check the highest API level method which I had used.

1 Answer 1

2

Set your target SDK level to your minimum SDK, set your project build target to be the same API level, recompile and fix the errors as they show up.

Note that you will still have to handle API behavior changes like what happened with AsyncTask, but its a start.

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

2 Comments

Ok after a bit of testing I realise this is not a foolproof method. Specifically the method of getElapsedRealtimeNanos() in Location Class does not get an error message with I set my minSDK and targetSDK to 14 even though it is only available for API 17 and up.
Don't forget your project build target.

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.