How to change the Android application icon in Worklight

℡╲_俬逩灬. 提交于 2019-12-13 04:22:59

问题


I read instructions in this forum thread on how to change the application icon in Worklight, but it doesn't work. 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/native/AndroidManifest.xml:28: error: Error: String types not allowed (at 'icon' with value 'icon.png').

any idea or example?

Many Thanks, Dominique


回答1:


The application icon resides under the drawable folders. For example, in a Worklight project look under: 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
  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
  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.



来源:https://stackoverflow.com/questions/15461788/how-to-change-the-android-application-icon-in-worklight

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