error on java.lang.IllegalArgumentException: provider==null

荒凉一梦 提交于 2019-12-04 17:02:20
jeet

You are getting this error most probably, due to un-availability of GPS Providers. Please ask the person to check settings if Gps Provider or Network Provider has been enabled into Location settings.

Also make sure to add android.permission.ACCESS_FINE_LOCATION or android.permission.ACCESS_COARSE_LOCATION to your Manifest file, this solved the issue for me (all providers were already enabled in the location settings).

I solved this by adding :

`[assembly: UsesPermission(Manifest.Permission.AccessFineLocation)] [assembly: UsesPermission(Manifest.Permission.AccessCoarseLocation)] [assembly: UsesPermission(Manifest.Permission.Internet)]'

in assemlyInfo.cs to give permission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!