Phonegap:gap:config-file不能在config.xml上运行

Ove*_*ind 5 cordova phonegap-build

我试图在我的Phonegap项目的config.xml上使用元素"gap:config-file"来修改生成的AndroidManifest.xml的一些元素,但它不起作用.

我将此添加到我的config.xml:

<gap:config-file platform="android" parent="/manifest">
    <supports-screens
    android:xlargeScreens="false"
    android:largeScreens="false"
    android:smallScreens="false" />
</gap:config-file>
Run Code Online (Sandbox Code Playgroud)

然后我做了

phonegap build android
Run Code Online (Sandbox Code Playgroud)

一切都是成功的,但是当我打开AndroidManifest.xml时,没有任何变化,仍然会出现旧的值:

<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
Run Code Online (Sandbox Code Playgroud)

我已经尝试了几个小时,但我无法做到这一点.

任何的想法?

谢谢!古斯塔沃

bju*_*nix 6

这是仅适用于Phonegap Build的功能.该功能记录在此处:http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/

在本地,您可以创建自定义插件并指定清单的覆盖.另一种选择是直接编辑AndroidManifest.xml并在那里添加所需的选项.在构建过程中不会覆盖这些更改.