android.app.AppOpsManager not find in android proj

2019-08-07 19:35发布

问题:

I'm developing an Android application with Android Studio. I have added the package Google Maps for including the maps in my project. I have done everything to do this,create the key and the signature in the developer console,add the key in the manifest and the "google-play-services" package through gradle. But,when I launch the app,I have this error:

Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.hg.a

Why? I haven't found any fix for this issue on web.However,the app works and shows the map inside my activity.