Evgeniy Mishustin Evgeniy Mishustin - 1 month ago 19
Android Question

Can't resolve getSystemService(FINGERPRINT_SERVICE)

Very strange issue faced. The following code

fingerprintManager = (FingerprintManager) mContext.getSystemService(Context.FINGERPRINT_SERVICE);


underlines in red color the Context.FINGERPRINT_SERVICE and says: "must be one of following... " and prints me all the possible system services, where FINGERPRINT is absent. But if i go into sources of Context class I can see the FINGERPRINT_SERVICE constant present.
Permission included in manifest.
Build tools is 23.0.1.
Worked in another project with the same studio and api level. What is wrong ?

Answer

Your compileSdkVersion is lower than 23, presumably.

Comments