简体   繁体   English

如何在Worklight中更改Android应用程序图标

[英]How to change the Android application icon in Worklight

I read instructions in this forum thread on how to change the application icon in Worklight, but it doesn't work. 在该论坛主题中阅读了有关如何在Worklight中更改应用程序图标的说明,但是它不起作用。 I get the following error: 我收到以下错误:

.../android-sdk-linux/platform-tools/aapt: /lib/libz.so.1: no version information available (required by /home/vernid/data/Development/WorkLight/android-sdk-linux/platform-tools/aapt) ... / android-sdk-linux / platform-tools / aapt:/lib/libz.so.1:没有可用的版本信息(/ home / vernid / data / Development / WorkLight / android-sdk-linux / platform必需-工具/ apt)

.../android/native/AndroidManifest.xml:28: error: Error: String types not allowed (at 'icon' with value 'icon.png'). ... / android / native / AndroidManifest.xml:28:错误:错误:不允许的字符串类型(在“ icon”处,值为“ icon.png”)。

any idea or example? 有什么想法或例子吗?

Many Thanks, Dominique 非常感谢,多米尼克

The application icon resides under the drawable folders. 应用程序图标位于可绘制文件夹下。 For example, in a Worklight project look under: yourAppName\\android\\native\\res\\drawable-*\\icon.png. 例如,在Worklight项目中,查看:yourAppName \\ android \\ native \\ res \\ drawable-* \\ icon.png。 This is the icon you want to replace. 这是您要替换的图标。

To replace the application icon: 替换应用程序图标:

  1. Open the nativeResources folder: yourAppName\\android\\nativeResource\\res 打开nativeResources文件夹:yourAppName \\ android \\ nativeResource \\ res
  2. Each drawable folder in it represents a different screen density; 其中的每个可绘制文件夹代表不同的屏幕密度。 you need to place your different icon.png files for each of the densities* you support in your application 您需要为应用程序中支持的每种密度*放置不同的icon.png文件
  3. After you have placed the images, build and deploy 放置映像后,构建并部署
  4. Launch in emulator or device, you should now see the new icon 在模拟器或设备中启动,您现在应该看到新图标

For more information about screen densities in Android, see the online documentation for it . 有关Android屏幕密度的更多信息, 请参见的在线文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM