科尔多瓦更新android版本没有任何损失 [英] cordova update android version without any loss

查看:136
本文介绍了科尔多瓦更新android版本没有任何损失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令在我的cordova项目中更新我的android版本:

I was trying to update my android version in my cordova project using this command:

cordova platform update android

但这是响应:

Using cordova-fetch for cordova-android@~7.0.0
Updating android project...
(node:4188) UnhandledPromiseRejectionWarning: An in-place platform update is not supported. 
The `platforms` folder is always treated as a build artifact in the CLI workflow.
To update your platform, you have to remove, then add your android platform again.
Make sure you save your plugins beforehand using `cordova plugin save`, and save 
a copy of the platform first if you had manual changes in it.
    cordova plugin save
    cordova platform rm android
    cordova platform add android

(node:4188) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4188) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我担心如果这样做,将会丢失我所做的一些自定义设置(例如丢失应用程序图标,启动屏幕,我编辑了一种方法,以便在应用程序处于全屏模式时可以看到键盘)

I worried if I do so, I will lose some customisations I did (like losing the app icons, splash screens and i edited a method so the keyboard is visible when the app is in full-screen mode )

可以通过一些方法完成吗?

Can it be done some how?

推荐答案

应用程序图标的更改和启动

应用程序图标和启动驻留在资源文件夹中,因此,如果删除平台,则不会有任何影响。如果您手动添加了任何图标,请确保在更新之前在config.xml中放置一个条目。

The app icons and splash are residing in the resources folder so if you delete your platform it won't affect anything. If you have manually added any icon make sure to put an entry in config.xml before your update.

任何插件的更改

如果您更改了任何插件,请执行遵循步骤

If you have changed any plugin then do the following steps


  • 检测已更改代码的插件。

  • 搜索该插件

  • 更改您在平台代码中所做的任何操作。

  • 将代码推送到GitHub。

  • 删除该插件( cordova插件rm< plugin_id> )。

  • 添加插件( cordova插件添加https://github.com/xxxxxx/xxxxxxxx )。
    (如果您认为您的方法对其他人有帮助,那么您也可以在父插件中提高PR)

  • Detect the plugin for which you have changed your code.
  • Search for the plugin repo and fork it.
  • Change whatever you did it in your platform's code.
  • Push your code to GitHub.
  • Remove that plugin(cordova plugin rm <plugin_id>).
  • Add the plugin (cordova plugin add https://github.com/xxxxxx/xxxxxxxx). (If you think your method will be helpful for others' then you can also raise a PR in the parent plugin)

这篇关于科尔多瓦更新android版本没有任何损失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆