Reputation: 1122
I recently ran into a problem where I tested my app on an older version of Android (API 12) and my target API level is 22. When I ran it in Honeycomb it was crashing do to a method call that is for API 16.
My question is, how can I find all method calls that are for a higher version than my minSDKVersion (which is 11)? Just to make sure Im not making that mistake anywhere else in my app.
By the way, Im using Android Studio
Thanks for any help
Upvotes: 1
Views: 1200
Reputation: 5618
You should be able to see the deprecated symbol like this for older api methods
you can also check api level and provide alternative methods like this
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
CookieManager.getInstance().removeAllCookies(null);
} else {
CookieManager.getInstance().removeAllCookie();
}
Upvotes: 1
Reputation: 4651
Upvotes: 2