0

我正在尝试为 Android Tv 制作一个应用程序它是一个屏幕保护程序应用程序我正在从 Google 的官方文档和此链接中获取帮助

[ https://android-developers.googleblog.com/2012/12/daydream-interactive-screen-savers.html]

这是我的清单文件,该应用程序只是使用 DayDream Service 在 WebView 上加载 URL,如果我在手机上安装此应用程序,它可以完美运行(我说的是唯一的安装,我在运行屏幕保护程序时仍然有问题),但是在此之前我该如何解决这个错误? “解析包时出错”

<?xml version="1.0" encoding="utf-8"?>

<uses-feature
    android:name="android.hardware.touchscreen"
    android:required="false" />
<uses-feature
    android:name="android.software.leanback"
    android:required="true" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:banner="@drawable/app_icon_your_company"
        android:icon="@drawable/app_icon_your_company"
        android:label="@string/app_name"
        android:logo="@drawable/app_icon_your_company"
        android:screenOrientation="landscape">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
        </intent-filter>
    </activity>
    <service
        android:name="Screensaver"
        android:exported="true"
        android:label="WebView">
        <intent-filter>
            <action android:name="android.service.dreams.DreamService" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </service>

    <activity
        android:name="SetURL"
        android:label="Dream URL"
        android:theme="@android:style/Theme.Translucent.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/plain" />
        </intent-filter>
    </activity>
    <activity
        android:name="SetURLInteractive"
        android:label="Dream URL (Interactive)"
        android:theme="@android:style/Theme.Translucent.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/plain" />
        </intent-filter>
    </activity>
</application>

4

0 回答 0