android - Permission required to use UsageStatsManager -


i'm trying use usagestatsmanager. understand need put following android manifest:

<uses-permission     android:name="android.permission.package_usage_stats"     tools:ignore="protectedpermissions" /> 

however, eclipse throws following error when try that: prefix "tools" attribute "tools:ignore" associated element type "uses-permission" not bound.

how declare permission properly?

in manifest file, have add tools namespace. can declare way:

xmlns:tools="http://schemas.android.com/tools" 

for example in manifest tag:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"> . . . </manifest> 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -