用户或当前进程都没有android.permission.ACCESS_COARSE_LOCATION [英] Neither user nor current process has android.permission.ACCESS_COARSE_LOCATION

查看:325
本文介绍了用户或当前进程都没有android.permission.ACCESS_COARSE_LOCATION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这可能是一个愚蠢的问题,之前我已经提到了所有类似的问题,但不幸的是我可以解决此问题.我的Manifest.xml文件中最有可能是问题.

I know it may be silly question and I have referred all the similar question before but unfortunately I could resolve this issue. Most probably it is problem in my Manifest.xml file.

当我尝试访问位置时,应用崩溃了

When I am trying to access location, app is crashing

这是我的manifest.xml

here is my manifest.xml

<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.tt.test" >

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".sTest"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>


    </activity>
    <service android:name="com.test.tt.test.sService">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter> </service>
    <service android:name="com.test.tt.test.sServiceRequest" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />


</application>

当我运行它时抛出此错误

when I run it throw this error

 java.lang.SecurityException: Neither user 11029 nor current process has android.permission.ACCESS_COARSE_LOCATION.

与其他权限类似.我在清单文件中看不到任何错误.感谢帮助

Similar with other permissions. I can not see any mistake in my manifest file. Help appreciated

推荐答案

这意味着您在清单文件中包含一些错误信息或格式错误的信息,因此这是您的应用程序未识别任何权限的原因.只要确保您清除了格式错误的数据中的ANDROIDMANIFEST文件即可.

This means you have some wrong information or malformed info in your menifest file and that is the reason none of your Permission is not identified by your app. Just make sure you have cleaned ANDROIDMANIFEST file with any malformed data.

它将起作用,并且所有权限都应在Application标记之外

It will work and all permission should be outside Application tag

这篇关于用户或当前进程都没有android.permission.ACCESS_COARSE_LOCATION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆