Expo Go Stripe: Native module不能为空



我相信Expo-Go现在可以支持条纹支付了(基于这里提供的更新文档)

我使用的是Expo SDK Version 40.

我执行

"expo install @ stripe/stripe-react-native"

确保我得到正确的版本。

然后我尝试导入条纹到我的项目使用:

import { StripeProvider } from '@stripe/stripe-react-native'

一旦项目刷新,应用程序崩溃并抛出~25个错误/警告,最常见的是"Native模块不能为null"误差

还有其他人遇到这个错误吗?

我使用的是Expo SDK Version 40

你必须使用更高的版本,如41/42,我相信,所以我会试着更新它。根据您分享的链接,您会注意到https://docs.expo.dev/versions/v41.0.0/sdk/stripe/存在,但https://docs.expo.dev/versions/v40.0.0/sdk/stripe/不存在。

https://github.com/stripe/stripe-react-native/issues/467 issuecomment - 889217595

https://github.com/stripe/stripe-react-native/issues/256 issuecomment - 846922117

相关内容

最新更新