0

我们有一个 html/js 的小项目,我们想制作一个原生应用程序,只是为了在我的设备上获得漂亮的图标。

我尝试过phonegap,它的工作方式与我预期的一样。但现在我想通过命令行构建,因为我真的不想创建一个 zip 文件并每次都手动上传。

对于 android,它就像一个老板。我使用命令:

phonegap remote build android

但是当我用 ios 尝试它时,构建永远不会结束。控制台输出:

[phonegap] compressing the app...
[phonegap] uploading the app...
[phonegap] building the app...

为了确保我不是太不耐烦,我等了 2 个小时。

有什么建议或者您需要更多信息来解决我的问题吗?

配置文件

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns  = "http://www.w3.org/ns/widgets"
    xmlns:gap  = "http://phonegap.com/ns/1.0"
    id         = "com.phonegap.example"
    versionCode="10" 
    version    = "1.0.0">
    <name>My App</name>
    <gap:platform name="ios" />
    <gap:platform name="android" />
    <gap:platform name="winphone" />

    <preference name="orientation" value="portrait" />

    <preference name="permissions" value="none"/>

    <description>
        My super app
    </description>

    <access origin="*" />

    <icon src="icons/Icon.png"/>

    <icon src="icons/ios/Icon.png" gap:platform="ios" width="60" height="60" />
    <icon src="icons/ios/Icon-76.png" gap:platform="ios" width="76" height="76" />
    <icon src="icons/ios/Icon@2x.png" gap:platform="ios" width="120" height="120" />
    <icon src="icons/ios/Icon-76@2x.png" gap:platform="ios" width="152" height="152" />

    <icon src="icons/android/36.png" gap:platform="android" gap:density="ldpi" />
    <icon src="icons/android/48.png" gap:platform="android" gap:density="mdpi" />
    <icon src="icons/android/72.png" gap:platform="android" gap:density="hdpi" />
    <icon src="icons/android/96.png" gap:platform="android" gap:density="xhdpi" />

    <icon gap:platform="winphone" src="icons/windows-phone/Icon.png" />
    <icon gap:platform="winphone" gap:role="background" src="icons/windows-phone/Background.png" />

    <gap:splash src="screen/Screen.png" />

    <gap:splash gap:density="ldpi" gap:platform="android" src="screen/android/ldpi.png" />
    <gap:splash gap:density="mdpi" gap:platform="android" src="screen/android/mdpi.png" />
    <gap:splash gap:density="hdpi" gap:platform="android" src="screen/android/hdpi.png" />
    <gap:splash gap:density="xhdpi" gap:platform="android" src="screen/android/xhdpi.png" />

    <gap:splash gap:platform="blackberry" src="screen/blackberry/screen-225.png" />

    <gap:splash gap:platform="ios" height="480" src="screen/ios/Default.png" width="320" />
    <gap:splash gap:platform="ios" height="960" src="screen/ios/Default@2x.png" width="640" />
    <gap:splash gap:platform="ios" height="1004" src="screen/ios/Default-ipad" width="768" />
    <gap:splash gap:platform="ios" height="2008" src="screen/ios/Default-ipad@2x.png" width="1536" />

    <gap:splash gap:platform="winphone" src="screen/windows-phone/Default.png" />
</widget>
4

1 回答 1

0

删除应用程序并使用phonegap create 创建一个新的应用程序来解决问题。

于 2013-10-10T20:24:29.947 回答