简体   繁体   English

如何在 Expo 客户端上打开 React Native 应用程序?

[英]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.

相关问题 使用 react native / expo app (android) 打开已安装的应用程序 - Open an installed application using react native / expo app (android) 如何将 react-native-google-mobile-ads 与 Expo 和 Expo Go 一起使用? - How do I use react-native-google-mobile-ads with Expo and Expo Go? React Native - 如何构建 expo 反应原生应用程序,使其不需要 Expo android 应用程序打开 - React Native - How to build expo react native app so that it does not require Expo android app to open 如何使用 Expo 在本机反应中打开默认联系人应用程序? - How to open default Contact app in react native using Expo? 如何在 expo react-native 中打开键盘时隐藏 TabBar - how to hide TabBar when keyboard is open in expo react-native 如何在 React Native 中打开外部应用程序? - how can i open an external application in React Native? 如何在 React Native(expo android)中将 output 纸张大小更改为 A4 - How Do I change output Paper Size to A4 in React Native (expo android) 如何使用旧的 Expo 密钥签署我的新 React Native App [Android]? - How do I sign my new React Native App [Android] with my old Expo key? 如何在模拟器中打开 react-native 应用程序? - How do I open react-native app in emulator? 如何在 Expo React-Native 中使用下拉列表? - How can I use DropDown List in Expo React-Native?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM