React native 如何在Android上测试深度链接?

React native 如何在Android上测试深度链接?,react-native,adb,react-native-android,react-navigation,deep-linking,React Native,Adb,React Native Android,React Navigation,Deep Linking,我正在尝试在Android上本地测试深度链接。我可以通过以下链接在iOS上进行测试: xcrun simctl openurl booted exp://127.0.0.1:19000/–/challenges/[SHARE-TOKEN] 对于Android,我尝试过: adb shell am start -W -a android.intent.action.VIEW -d “exp://192.168.100.7:19000/–/challenges/[SHARE-TOKEN]” com

我正在尝试在Android上本地测试深度链接。我可以通过以下链接在iOS上进行测试:

xcrun simctl openurl booted exp://127.0.0.1:19000/–/challenges/[SHARE-TOKEN]
对于Android,我尝试过:

adb shell am start -W -a android.intent.action.VIEW -d “exp://192.168.100.7:19000/–/challenges/[SHARE-TOKEN]” com.myapp.android
但我收到这样一条消息:错误:活动未启动,无法解析意图

参考:


有什么方法可以在Android上测试深度链接,或者我遗漏了什么吗?

您可以简单地使用以下方法:

adb shell "am start 'exp://192.168.100.7:19000/–/challenges/[SHARE-TOKEN]'"

确保使用常规的双引号符号。不是像你问题中那样的“排版”。我已经为此挣扎了一天了:谢谢你的帮助。