我正在尝试更改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项目不同。任何帮助将不胜感激。
您无需更改任何代码。该android\res
文件夹包含带有不同分辨率图标的文件夹。您可以使用自己的自定义图像简单地覆盖每个文件夹中的ic_launcher.png文件(确保与每个文件夹中现有图像的大小匹配)。这就是我所做的,而且效果很好。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句