服务不能因为&QUOT运行;拒绝的权限和QUOT ;,要求的权限为null [英] Service failing to run because of "Permission Denial", permission required is null

查看:213
本文介绍了服务不能因为&QUOT运行;拒绝的权限和QUOT ;,要求的权限为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序已经运行良好,但我想我一定是不小心改了不该做的事。我有我的程序运行UpdateService按钮上的preSS,但现在它不运行和调试带来了以下两行:

My program has been running fine, but I think I must have accidentally changed something I shouldn't have done. I had my program running "UpdateService" on the press of a button, but now it doesn't run, and debug brings up the following two lines:

01-05 21:43:39.945: WARN/ActivityManager(98): Permission denied: checkComponentPermission() reqUid=10084
01-05 21:43:39.955: WARN/ActivityManager(98): Permission Denial: Accessing service ComponentInfo{com.android.datausagemonitor/com.android.datausagemonitor.UpdateService} from pid=98, uid=1000 requires null

下面是我的表现,通过类似的帖子判断它很可能是这个问题,但我不能看到它,我pretty肯定我没有改变任何东西,因为它是最后一个工作:

Here is my manifest, judging by similar posts it could well be a problem with this, but I can't see it and am pretty sure I haven't changed anything since it was last working:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.android.datausagemonitor"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS"></uses-permission>

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".DataUsageMonitorActivity"
              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.android.datausagemonitor.UpdateService"></service>
    <service android:name="com.android.datausagemonitor.ResetService"></service>

</application>

推荐答案

[解决]有一些问题,Eclipse和我测试的设备之间的UID。重新启动设备解决了这个问题。

[Solved] There was some problem with the Uid between Eclipse and the device I was testing on. Rebooting the device solved the problem.

这篇关于服务不能因为&QUOT运行;拒绝的权限和QUOT ;,要求的权限为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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