Why does locationManager.getBestProvider() returns null? (Nexus 5x)
问题 I am trying to get device (Nexus 5x) location by following a tutorial. But its not working and I found out, that the line locationManager.getBestProvider(new Criteria(), false); always returns null. Here is my manifest content: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="lt.wilkas.locationdemo"> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission