Reputation: 1299
I've been using Android Studio for a while now, and it always reported the correct API level for the methods I use, and so did the Android Developer guide.
Then I encoutered the method View.setForeground(Drawable), introduced in Android M. The documentation reports that it's on Android since API level 1, but that's wrong.
My question is: why? And, from now on, how can I verify that the API level that Android Studio/Android Developer Guide reports is right?
EDIT: issue reported to Google: https://code.google.com/p/android/issues/detail?id=186273&thanks=186273&ts=1442226130
Upvotes: 3
Views: 264
Reputation: 2528
The only way to know with 100% certainty would be to manually check the file history for the file in question on github, and double check the method you're looking at exists in the file revisions it is supposed to. This is not a realistic thing to do for every single method call, but if the developer documents are wrong there's no other way.
If you do notice errors such as this, you should check the issue tracker to see if the issue has been reported, and if not create a new issue so they can fix it. At least then you might save a few people from falling into the same trap.
Upvotes: 3