我创建了正在运行的动态壁纸。然后,我尝试使用配置添加主要活动,但是当我单击程序列表上的图标时,出现“启动器没有启动 Intent 的权限”错误。
ERROR/Launcher(8246): Launcher does not have the permission to launch Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.revicostudio.neonshiftwallpaper/.ConfigActivity }. Make sure to create a MAIN intent-filter for the corresponding activity or use the exported attribute for this activity. tag=ApplicationInfo(title=Neon Shift Wallpaper) intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.revicostudio.neonshiftwallpaper/.ConfigActivity }
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.revicostudio.neonshiftwallpaper/.ConfigActivity } from ProcessRecord{41ea3da8 8246:com.android.launcher/u0a10035} (pid=8246, uid=10035) not exported from uid 10139
显现:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.revicostudio.neonshiftwallpaper"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"
android:name="android.software.live_wallpaper">
</uses-feature>
<application
android:icon="@drawable/icon"
android:configChanges="keyboardHidden|orientation"
android:label="@string/app_name" >
<!-- Live Wallpaper Service -->
<service android:name=".MainService"
android:enabled="true"
android:configChanges="keyboardHidden|orientation"
android:permission="android.permission.BIND_WALLPAPER"
android:icon="@drawable/icon"
android:description="@string/wallpaper_description">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService"/>
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="@xml/wallpaper"/>
</service>
<activity
android:name=".ConfigActivity"
android:label="@string/app_name"
android:exported="true"
android:theme="@android:style/Theme.Light.WallpaperSettings" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.revicostudio.neonshiftwallpaper.WallpaperPreferences"
android:exported="true"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.WallpaperSettings" >
</activity>
</application>
</manifest>