Mukhtar Asarori
Mukhtar Asarori

Reputation: 11

Add @Target Api(MARSHMALLOW) Annotation

I go following issues when I develop android app Add @Target Api(MARSHMALLOW) Annotation. How can I fix it?

error message

Upvotes: 0

Views: 661

Answers (2)

laalto
laalto

Reputation: 152867

Use Object getSystemService(String) instead of the T getSystemService(Class<T>) overload that is only available from API level 23 onwards.

Upvotes: 0

bond007
bond007

Reputation: 2494

Try using. Its for API 23

 @TargetApi(Build.VERSION_CODES.M)

Upvotes: 1

Related Questions