I just got a NoClassDefFoundError when testing an Android app I'm building on a Device running API level 28. When I checked the documentation the method causing the crash was introduced in API level 29. As I have targeted the app for API level 18 I am used to be shown Call requires API level X (current min is 18) lints inside Android Studio when using newer API calls. But in this case there was nothing. Why is that?
Code snippet:
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
//Gives expected lint error notification: Call requires API level 28 (current min is 18)
tm.getSignalStrength();
//No lint error whatsoever (API Level 29 needed)
tm.requestCellInfoUpdate(null, null);