[英]How do I open a React Native Application on Expo Client?
I created an application using "react-native init MyProject" in Node.js command line.我在 Node.js 命令行中使用“react-native init MyProject”创建了一个应用程序。 I want to open this application on my physical android device and not in my Android Studio emulator, I have installed Expo Client and I have tried "npm run start" and "react-native run android" but the application doesn't open on my device instead it appears in the Android Studio Emulator.我想在我的物理 android 设备上打开这个应用程序,而不是在我的 Android Studio 模拟器中,我已经安装了 Expo 客户端,我已经尝试在我的“npm run start”上运行应用程序,但“应用程序没有打开”设备,而是出现在 Android Studio Emulator 中。 Do I need to initialize a project with "expo init projectname" for it to work on my android device?我是否需要使用“expo init projectname”初始化项目才能在我的 android 设备上工作?
To initialize a react-native app in your phone, you will need to enable the Android development mode in your phone.要在手机中初始化 react-native 应用程序,您需要在手机中启用 Android 开发模式。 You can do this following this tutorial .您可以按照本教程执行此操作。
After you connect your phone in the computer with USB and run:将手机与电脑连接到 USB 并运行:
npx react-native run-android
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.