gpt4 book ai didi

android - 如何在 React Native 中只为 iOs 或 Android 安装包

转载 作者:行者123 更新时间:2023-11-29 18:25:28 26 4
gpt4 key购买 nike

我想知道是否可以在 React Native 中只为 iOs 或 Android 安装一个包?我正在为 Apple Pay 使用 tipsi-stripe,Android 和 RN0.61.5 存在一些错误,我在 Android 上不需要它。

我尝试从 Android Studio 和 packages.json 中删除模块,它可以正常工作,但不干净,有人有更好的解决方案吗?

最佳答案

尝试将此添加到您的 react-native.config

module.exports = {
...
dependencies: {
'tipsi-stripe': {
platforms: {
android: null,
},
},
},
};

关于android - 如何在 React Native 中只为 iOs 或 Android 安装包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59269025/

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