Evgeniy Mishustin Evgeniy Mishustin - 1 year ago 127
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 Source

Your compileSdkVersion is lower than 23, presumably.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download