【问题标题】:Android resource linking failed when i deployment target当我部署目标时,Android资源链接失败
【发布时间】:2019-01-31 08:45:02
【问题描述】:

当我选择我的 android 设备时出现此错误。我正在使用它与 libgdx 进行游戏测试。

Android 资源链接失败

C:\Users\oguzh\AndroidStudioProjects\Flying Smurfs\android\build\intermediates\ınstant_run_merged_manıfests\debug\processDebugManifest\instant-run\AndroidManifest.xml:11:错误:找不到属性 android:appCategory。

错误:处理清单失败。

这是我的清单 xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.oguzhanaygun.flyingsmurfs" >

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:isGame="true"
    android:appCategory="game"
    android:label="@string/app_name"
    android:theme="@style/GdxTheme" >
    <activity
        android:name="com.oguzhanaygun.flyingsmurfs.AndroidLauncher"
        android:label="@string/app_name"
        android:screenOrientation="landscape"
        android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

【问题讨论】:

  • android 8.0 中添加了 appCategory 属性,所以如果您使用早期的 sdk 进行编译,它将无法正常工作

标签: android libgdx manifest


【解决方案1】:

tools:targetApi="o" 添加到 application 节点并定位 API 级别 >= 26

... 或删除 android:appCategory="game",当针对 API 级别 26。

【讨论】:

    猜你喜欢
    • 2019-02-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多