我正在构建的Android React Native应用通过访问摄像头/媒体流getUserMedia
。当我adb
使用react-native run-android
电缆在物理设备上运行该应用程序时,当我导航到使用它的场景时,可以完美地看到摄像机捕获的流。
但是,当我使用以下方法创建apk时:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
cd android/ ./gradlew assembleDebug
并安装在设备上,通过松弛将apk发送到手机,当我导航到该组件时,媒体流不会出现在该组件中!显然,我无法调试该应用程序。任何想法表示赞赏。
我发现了原因-由于某种原因,在我的描述中以后者的方式构建设备时,该设备需要存储权限!:/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句