gpt4 book ai didi

android - 无法在 Cordova 中删除 Android 平台

转载 作者:行者123 更新时间:2023-11-29 14:43:13 25 4
gpt4 key购买 nike

我正在尝试删除我的 cordova 应用程序中的 Android 平台,但我做不到。感谢您的帮助!

$ cordova platform remove android

rm: could not remove directory (code ENOTEMPTY): myapp\platforms\android/app

rm: could not remove directory (code ENOTEMPTY): myapp\platforms\android/app rm: could not remove directory (code ENOTEMPTY): myapp\platforms\android

Removing platform android from config.xml file...

不知道为什么,但我检查它是否至少被识别为已删除但它不是:

$cordova platform

Installed platforms:
android

Available platforms:

android ~7.0.0 browser ~5.0.1 ios ~4.5.4 osx ~4.0.1 windows ~5.0.0 www ^3.12.0

如果我去重新添加 android 平台,我会得到这个:

$ cordova platform add android

Using cordova-fetch for cordova-android@^7.0.0 (node:11012) UnhandledPromiseRejectionWarning: CordovaError: Platform android already added. at C:\Users\computer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\platform\addHelper.js:149:35 at _fulfilled (C:\Users\computer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\Users\computer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30) at Promise.promise.promiseDispatch (C:\Users\computer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13) at C:\Users\computer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44 at flush (C:\Users\computer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) (node:11012) 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:11012) [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.

最佳答案

我想通了。我不得不使用 rm 而不是像这样删除:

cordova platform rm android

不知道为什么,希望有人详细说明,cordova 文档包含 cordova platform remove

关于android - 无法在 Cordova 中删除 Android 平台,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52491470/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com