When adding permissions to my manifest file, the below xml works.
<permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
java.lang.SecurityException: "gps" location provider requires ACCESS_FINE_LOCATION permission.
For the first part, you should be using
<uses-permission> according the the Android Devlopers site. Try making sure you declare your permissions directly under the
<manifest> tag, not in your
<application> tag. It's hard to know what your problem is without seeing your entire manifest file. Check out the link I posted above for more info on how to declare permissions in your manifest.
In regards to your runtime permissions problem:
With uses-permissions Cannot resolve that..
Make sure you're using
android.Manifest instead of
my.app.package.Manifest. A lot of times Android Studio will default to the latter instead of the former.
So, your new line of code would look like:
Edit: I reformatted my answer.