【发布时间】:2020-11-05 08:34:57
【问题描述】:
我正在尝试更改用于开发游戏的 libGDX 项目的应用程序图标。他们提供了一个示例 ic_launcher.png 文件用于设置应用程序图标,我正在尝试将其更改为不同的 png 文件。我已经为 mdpi、hdpi、xhdpi、xxhdpi 和 xxxhdpi 以及 anydpi 指定了所有内容,但是在 AndroidManifest.xml 中,当我想将图标更改为 @drawable/my_launcher 时,它说这是一个无效符号。我什至指定了与提供的ic_launcher.png 相同的长度和宽度。这是AndroidManifest.xml 文件。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.zunkuftedu.zunkuftlife" >
<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="org.zunkuftedu.zunkuftlife.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>
这是一个 libGDX 项目,所以它不同于普通的 Android Studio 项目。任何帮助将不胜感激。
【问题讨论】: