アンドロイドでライブ壁紙を作成したいと思います。私のアプリはエミュレータで正常に動作しますが、私の電話ではインストールできません。ここで残念なことにパッケージインストーラがアンドロイドを停止しました
は私のAndroidManifest.xmlです:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:permission="android.permission.BIND_WALLPAPER"
android:supportsRtl="true"
android:debuggable="false"
android:theme="@style/AppTheme">
<service
android:name="GIFWallpaperService"
android:enabled="true"
android:label="Wallpaper Example "
android:permission="android.permission.BIND_WALLPAPER" >
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" >
</action>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/wallpaper" >
</meta-data>
</service>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
wallpaper.xml:
<?xml version="1.0" encoding="UTF-8"?>
<wallpaper
xmlns:android="http://schemas.android.com/apk/res/android"
android:label="GIF Wallpaper"
android:debuggable="false"
android:thumbnail="@mipmap/ic_launcher">
</wallpaper>
私はエミュレータすべての私のコードを実行しようとするたびにうまく動作しますが、wh私の電話に "app-debug"をコピーし、それをインストールしようとすると動作しません。 インストールが完了したら、次の2つのオプションが表示されます。
- アプリを開きます。
- 完了。
[完了]をクリックしてもインストールされたアプリアイコンをクリックすると、app is not installed
と表示されます。
私はインストールの終了時に開いてクリックした場合には、unfortunately package installer has stopped android
私の答えはここにあります:http://stackoverflow.com/questions/33314266/android-permission-denial-starting-intent-for-wallpaper-settings –