Android resource linking failed when i deployment target

我的未来我决定 提交于 2019-12-24 21:22:45

问题


I get this error when I select my android device. I'm using it for game testing with libgdx.

Android resource linking failed

C:\Users\oguzh\AndroidStudioProjects\Flying Smurfs\android\build\intermediates\ınstant_run_merged_manıfests\debug\processDebugManifest\instant-run\AndroidManifest.xml:11: error: attribute android:appCategory not found.

error: failed processing manifest.

And here is my manifest 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>

回答1:


add tools:targetApi="o" to the application node and target an API level >= 26

... or remove the android:appCategory="game", when targetting an API level < 26.



来源:https://stackoverflow.com/questions/54449179/android-resource-linking-failed-when-i-deployment-target

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!