Вежливость-главное оружие
233 / 234 / 86
Регистрация: 19.02.2013
Сообщений: 1,446
1

Java.lang.SecurityException: Neither user 10005 nor current process has android.permission.PACKAGE_USAGE_STATS

08.09.2015, 16:06. Показов 2088. Ответов 1
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Здравствуйте!

Как повиксить?
java.lang.SecurityException: Neither user 10005 nor current process has android.permission.PACKAGE_USAGE_STATS.

StackTrace:
Кликните здесь для просмотра всего текста

09-08 15:45:33.751 3002-3053/? W/ApplicationsProvider﹕ Could not fetch usage stats
java.lang.SecurityException: Neither user 10005 nor current process has android.permission.PACKAGE_USAGE_STATS.
at android.os.Parcel.readException(Parcel.java:1476)
at android.os.Parcel.readException(Parcel.java:1430)
at com.android.internal.app.IUsageStats$Stub$Proxy.getAllPkgUsageStats(IUsageStats. java:237)
at android.app.ActivityManager.getAllPackageUsageStats(ActivityManager.java:2217)
at com.android.providers.applications.ApplicationsProvider.fetchUsageStats(Applicat ionsProvider.java:674)
at com.android.providers.applications.ApplicationsProvider.updateApplicationsList(A pplicationsProvider.java:512)
at com.android.providers.applications.ApplicationsProvider.access$300(ApplicationsP rovider.java:69)
at com.android.providers.applications.ApplicationsProvider$UpdateHandler.handleMess age(ApplicationsProvider.java:206)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)


AndroidManifest:
Кликните здесь для просмотра всего текста

XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.activity"
    android:exported="true"
    android:installLocation="auto"
    android:versionCode="1"
    android:versionName="1.0">
 
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
 
    <application
        android:allowBackup="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name_short"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name_short"
            android:screenOrientation="portrait">
            <intent-filter>
                <category android:name="android.intent.category.MAIN" />
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".PlainContactsActivity"
            android:label="@string/app_name_short" />
        <activity
            android:name=".SettingsActivity"
            android:label="@string/app_name_short" />
        <activity
            android:name=".ProfileActivity"
            android:label="@string/app_name_short" />
    </application>
 
    <receiver
        android:name="com.example.device.SmsListener"
        android:enabled="true"
        android:exported="true">
        <intent-filter android:priority="999">
            <action android:name="android.provider.Telephony.SMS_RECEIVED" />
        </intent-filter>
    </receiver>
 
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
 
</manifest>


Gradle:
Кликните здесь для просмотра всего текста

XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
apply plugin: 'com.android.application'
 
android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"
 
    defaultConfig {
        applicationId "sj"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
 
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.android.support:support-v4:21.0.+'
}


Пытаюсь запустить на:
Java.lang.SecurityException: Neither user 10005 nor current process has android.permission.PACKAGE_USAGE_STATS


Помогите разобраться. Гугл ничего дельного не сказал.

Заранее спс!
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
08.09.2015, 16:06
Ответы с готовыми решениями:

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
Приветствую форумчане! У меня возникла проблема, когда я запускаю в командной строке jar файл...

Ошибка: Caused by Android java.lang.ClassCastException: android.app.Application cannot be cast
Здравствуйте. Очень нужен ваш совет. При запуске приложения появляется ошибка: Caused by:...

JIDEFX MaskTextField java.lang.NoSuchMethodError: java.lang.invoke.LambdaMetafactory.metaFactory
Имеется тестовое приложение: package testinputmask; import javafx.application.Application;...

Java.lang.ClassCastException: MyBaza.Diag cannot be cast to java.lang.Comparable
Подскажите как исправить... Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.ClassCastException:...

1
Вежливость-главное оружие
233 / 234 / 86
Регистрация: 19.02.2013
Сообщений: 1,446
08.09.2015, 18:00  [ТС] 2
Note: На AVD(Nexus_S_API_17) все работает

Добавлено через 1 час 50 минут
Note:
Кликните здесь для просмотра всего текста

09-08 17:58:07.341 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:07.341 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:07.341 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:12.341 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:12.341 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:12.341 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:17.351 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:17.351 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:17.351 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:22.351 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:22.351 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:22.351 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:27.361 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:27.361 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:27.361 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:31.371 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:31.471 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:31.641 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:31.831 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:31.931 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:32.021 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:32.111 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:32.191 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:32.361 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:32.361 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:32.361 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:34.331 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: startUpdate []
09-08 17:58:37.371 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:37.371 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:37.371 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:38.101 1359-1359/? E/FihIconView﹕ error invokeControlLiveIcon : java.lang.NoSuchMethodException: stopUpdate []
09-08 17:58:42.381 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:42.381 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:42.381 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail
09-08 17:58:47.381 244-359/? E/ThermalEngine﹕ Charger disconnected or off-line!!
09-08 17:58:47.381 244-359/? E/ThermalEngine﹕ Charger was off-line
09-08 17:58:47.381 244-359/? E/ThermalEngine﹕ PMIC/BATT thermal control initize fail



Вот такой трешь в логе пишится когда запускаю приложение на девайсе из android studio.

Как это трактовать?
0
08.09.2015, 18:00
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
08.09.2015, 18:00
Помогаю со студенческими работами здесь

Cursor Android Studio (java.lang.IllegalArgumentException: column '_id' does not exist)
Пытаюсь создать приложения с двумя кнопками: Добавить и Удалить, EditText для ввода значения. Но...

java.lang.AbstractMethodError: oracle.jdbc.driver.OracleCallableStatement.setStri ng(Ljava/lang/String;Ljava/lang/StringV
Господа, выручайте! Под бд Оracle требуется связывать параметры по имени, то есть 'select * from...

Tomcat HTTP Status 500 (java.lang.NoClassDefFoundError && java.lang.ClassNotFoundException) with MongoDB
Здравствуйте, пишу простенький сервер, который мог бы работать с MongoDB. Создал классы для...

Апплет,java.lang.RuntimeException: java.lang.NoClassDefFoundError
апплет использует сторонние подключенные либы, при его загрузке вылетает такой вот эксепшн.......


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru