gpt4 book ai didi

android-studio - 如何从 android 中删除 react native 包

转载 作者:行者123 更新时间:2023-12-05 08:06:17 32 4
gpt4 key购买 nike

我卸载了 react-native-reanimated。在删除之前取消链接

输出:

> npx react-native unlink react-native-reanimated
warn Calling react-native unlink [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Unlinking "react-native-reanimated" iOS dependency
info iOS module "react-native-reanimated" has been successfully unlinked
info Android module "react-native-reanimated" is not installed

其次是:

npm un react-native-reanimated

但是,当我在 Android Studio 中打开项目时,包仍然在列表中。

配置存储在哪里以及如何删除它?

enter image description here

最佳答案

要禁用特定包的自动链接,您可以在 react-native.config.js 文件中定义它。

   // react-native.config.js
module.exports = {
dependencies: {
'some-unsupported-package': {
platforms: {
android: null, // disable Android platform, other platforms will still autolink if provided
},
},
},
};

更多:Disable autolinking for a specific library on different platforms

关于android-studio - 如何从 android 中删除 react native 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61493838/

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