且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PhoneGap Android:如何强制应用程序使用资产www es 中的图标而不是 resdrawable 文件夹?

更新时间:2022-11-28 19:11:39

config.xml 仅供 PhoneGap Build 服务使用.

- 在本地构建,此文件将被忽略并使用 res/drawable 目录中的文件.
- 使用 PGBuild 构建,该服务会在您项目的根目录(在 index.html 旁边)查找此文件,并使用它来确定应将哪些图像复制到 res/drawable 文件夹的末尾以生成具有正确权限的 apk图像(在 Android 的情况下).

由于 PGBuild 为许多平台构建,config.xml 是他们在 html/js/css 之外提供尽可能多的自定义功能的方式.其中一些只是为了为每个平台选择您的图标/启动图像,但您也可以做更多的事情.PGBuild 根据上传文件的内容为每个平台执行每个本机所需的操作.

config.xml is used only by the PhoneGap Build service.

- Building locally, this file is ignored and the files in your res/drawable directory are used.
- Building with PGBuild, the service looks for this file at the root of your project (next to index.html) and uses it to identify what images should be copied into the res/drawable folder on their end to generate an apk with the right images (in the case of Android).

Since PGBuild builds for a lot of platforms, config.xml is their way of offering as much customisation capabilites as they can outside of the html/js/css. Some of this is just for picking your icons/splash images for each platform but you can do a lot more with too. PGBuild does each of the natively required actions for each platform based on the contents of the uploaded file.

我希望这足够清楚.