【发布时间】:2021-01-16 22:52:43
【问题描述】:
在 react native 和 android 运行了几天后,我添加了一些外部库,一切都很好。
重启电脑后,回到react native项目的根目录,输入
npx react-native run-android
并返回错误消息
error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location. Run CLI with --verbose flag for more details.
我的 Android 项目位于标准位置:MyReactProject\android。
任何想法发生了什么或如何解决这个问题?
【问题讨论】:
-
react-native start 只需打开捆绑器,所以不要收到该消息
-
谢谢!真正的命令是 'npx react-native run-android' 。我已经编辑了这个问题。
标签: android react-native