Somente emulador de erro de permissão ACCESS_FINE_LOCATION
Estou tendo um erro estranho ao usar APENAS o emulador. Encontrei uma pergunta com o mesmo problema há 9 meses, sem respostas ...
Estou usando os locais dos serviços do Google Play para obter locais no meu aplicativo e tenho certeza das minhas permissões de manifesto e tudo funciona perfeitamente no meu telefone, o problema ocorre ao usar apenas um emulador e tentei emuladores diferentes no iMac e no iMac. Máquinas Windows.
Duvido que os emuladores não suportem esta função básica!
aqui está o meu código de manifesto:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.orderme.ordermeandroid" >
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
e aqui é onde a exceção está disparando:
LocationRequest mLocationRequest = new LocationRequest();
mLocationRequest.setInterval(10000);
mLocationRequest.setFastestInterval(5000);
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient,mLocationRequest,this);
rastreamento de pilha:
08-26 14:01:19.699 10157-10157/com.orderme.ordermeandroid E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.orderme.ordermeandroid, PID: 10157
java.lang.SecurityException: Client must have ACCESS_FINE_LOCATION permission to request PRIORITY_HIGH_ACCURACY locations.
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at com.google.android.gms.location.internal.zzg$zza$zza.zza(Unknown Source)
at com.google.android.gms.location.internal.zzi.zza(Unknown Source)
at com.google.android.gms.location.internal.zzj.zza(Unknown Source)
at com.google.android.gms.location.internal.zzd$1.zza(Unknown Source)
at com.google.android.gms.location.internal.zzd$1.zza(Unknown Source)
at com.google.android.gms.common.api.zzc$zza.zzb(Unknown Source)
at com.google.android.gms.common.api.zzf.zza(Unknown Source)
at com.google.android.gms.common.api.zzf.zzb(Unknown Source)
at com.google.android.gms.common.api.zzi.zzb(Unknown Source)
at com.google.android.gms.location.internal.zzd.requestLocationUpdates(Unknown Source)
at com.orderme.ordermeandroid.Main.MainActivity.onConnected(MainActivity.java:184)
at com.google.android.gms.common.internal.zzk.zzh(Unknown Source)
at com.google.android.gms.common.api.zzg.zznt(Unknown Source)
at com.google.android.gms.common.api.zzg.onConnected(Unknown Source)
at com.google.android.gms.common.api.zzi$2.onConnected(Unknown Source)
at com.google.android.gms.common.internal.zzj$zzg.zzoD(Unknown Source)
at com.google.android.gms.common.internal.zzj$zza.zzc(Unknown Source)
at com.google.android.gms.common.internal.zzj$zza.zzs(Unknown Source)
at com.google.android.gms.common.internal.zzj$zzc.zzoF(Unknown Source)
at com.google.android.gms.common.internal.zzj$zzb.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)