03-23 13:25:01.580: ERROR/AndroidRuntime(3319): Caused by: java.lang.SecurityException: Not allowed to start service Intent { cmp=com.test/.MyWallpaperService } without permission android.permission.BIND_WALLPAPER
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main"
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=".MyWallpaperService"
android:permission="android.permission.BIND_WALLPAPER"
android:id="@+id/myWallSer">
<intent-filter>
<action android:name="com.test.MyWallpaperService"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</service>
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main"
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=".MyWallpaperService"
android:permission="android.permission.BIND_WALLPAPER"
android:id="@+id/myWallSer">
<intent-filter>
<action android:name="com.test.MyWallpaperService"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</service>
</application>
</manifest>
解决方案 »
- andriod 使用webview问题
- Android新手开发几个问题?
- [职业规划请教] 毕业三年,做了2年半手机软件开发,1年半mtk开发,1年android开发,现在对未来的路有点迷茫,希望前辈高手们给予指点..
- 第一次接触android平台,想问大牛们一些问题,谢谢啦
- Android游戏设计,关于屏幕刷新的问题!
- 如何创建一个始终显示在最前端的窗口,即使是切换到其他程序也始终显示在最前端?
- 希望能碰到高手 百度地图 覆盖层 无法刷新 无法显示 (就这些分了)
- 在安卓对讲机中BlockingQueue方法的错误,求大神解决
- 用eclipse打开Genymotion虚拟机时候出错,求指导(尽可能详细)
- Android Studio
- 新手问问,RadioGroup不能findViewById
- 关于NDK
application声明的上面再增加一句:
<uses-permission android:name="android.permission.BIND_WALLPAPER" />
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.test/.MyWallpaperService "
/>
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.test/.MyWallpaperService "
/>
是什么意思啊?加在哪?为什么加上这句话就可以了?