Issue
When using UsageStatsManager or UsageStats in Android Studio, it says
Cannot resolve symbol 'UsageStatsManager' / 'UsageStats'
I have downloaded SDK Platform, Intel x86 Atom_64 System Image, Google APIs and Sources for Android SDK under Android 5.0.1 (API 21) from Android SDK.
Solution
Set your buildSdkVersion to 21 or higher in your build.gradle file. UsageStatsManager was added in API Level 21; you need to be compiling against API Level 21 to reference that class.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.