I have created new Android phonegap project using eclipse and put my existing WWW folder of my iphone phonegap project.
我使用eclipse创建了新的Android phonegap项目,并将iphone phonegap项目现有的WWW文件夹放入其中。
I have all the icons and screen added for android device inside Android folder as show here.. and also added it to my config.xml
我在android文件夹中添加了android设备的所有图标和屏幕,如下图所示。并将其添加到config.xml中
For HDPI I have following icon and screen.
对于HDPI,我有如下的图标和屏幕。
assets\www\res\icon\android\icon-72-hdpi.png
资产\ www \ res \ \ android \图标- 72 hdpi.png
assets\www\res\screen\android\screen-hdpi-portrait.png
资产\ www \ res \ \ android \ screen-hdpi-portrait.png屏幕
When I run the application in Emulator, it keep showing the default PhoneGap icons and splash screen.
当我在模拟器中运行应用程序时,它会继续显示默认的PhoneGap图标和闪屏。
I have added icons and screens for LDIP, MDPI, HDPI, XHDPI.
我为LDIP、MDPI、HDPI、XHDPI添加了图标和屏幕。
here is my config.xml
这是我的config . xml
<icon src="icon.png" />
<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:density="ldpi" />
<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:density="mdpi" />
<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:density="hdpi" />
<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:density="xhdpi" />
Is there anything I need to set to use assets\www\res folder instead of the default eclipse EclipseProjectRoot\res\drawable folder ?
我需要设置什么东西来使用assets\www\res文件夹,而不是默认的eclipse EclipseProjectRoot\res\drawable文件夹吗?
Thanks
谢谢
1 个解决方案
#1
16
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.
配置。xml仅被PhoneGap构建服务使用。-在本地构建,此文件被忽略,并使用您的res/drawable目录中的文件。-使用PGBuild构建,该服务在项目的根目录(在index.html旁边)查找这个文件,并使用它识别哪些图像应该被复制到末尾的res/drawable文件夹中,以生成带有正确图像的apk(在Android中)。因为PGBuild为许多平台构建,所以配置。xml是他们在html/js/css之外提供尽可能多的定制功能的方式。其中一些只是为每个平台选择图标/飞溅图像,但是你也可以做更多的事情。PGBuild根据上传文件的内容为每个平台执行本机所需的操作。
I hope this is clear enough.
我希望这是足够清楚的。
#1
16
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.
配置。xml仅被PhoneGap构建服务使用。-在本地构建,此文件被忽略,并使用您的res/drawable目录中的文件。-使用PGBuild构建,该服务在项目的根目录(在index.html旁边)查找这个文件,并使用它识别哪些图像应该被复制到末尾的res/drawable文件夹中,以生成带有正确图像的apk(在Android中)。因为PGBuild为许多平台构建,所以配置。xml是他们在html/js/css之外提供尽可能多的定制功能的方式。其中一些只是为每个平台选择图标/飞溅图像,但是你也可以做更多的事情。PGBuild根据上传文件的内容为每个平台执行本机所需的操作。
I hope this is clear enough.
我希望这是足够清楚的。