简体   繁体   English

如何在config.xml中指定cordova android版本?

[英]How can I specify cordova android version in config.xml?

I want to use a specific version of cordova android (lets say 6.2.2). 我想使用特定版本的cordova android(比方说6.2.2)。 I know it can be done by this command : 我知道可以通过以下命令完成:

cordova add platform android@6.2.2 cordova添加平台android@6.2.2

But I want to know if there is way to just add platform and the version to put it inside the xml. 但我想知道是否有办法只添加平台和版本将其放入xml。

I have seen also this question How can I specify the minimum SDK in phonegap? 我也看到了这个问题如何指定phonegap中的最小SDK? It is ignoring android-minsdkversion in config.xml but I cannot figure out how it can be possible 它忽略了config.xml中的android-minsdkversion,但我无法弄清楚它是如何可能的

This is done using the <engine> tag: 这是使用<engine>标签完成的:

<engine name="android" spec="^6.3.0" />
<engine name="ios" spec="~4.5.1" />
<engine name="browser" spec="latest" />

You can find the docs for it here . 你可以在这里找到它的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM