React native 错误:enoint:没有这样的文件或目录,请打开“android\app\src\main\assets\index.android.bundle”

React native 错误:enoint:没有这样的文件或目录,请打开“android\app\src\main\assets\index.android.bundle”,react-native,react-native-android,signed-apk,metro-bundler,React Native,React Native Android,Signed Apk,Metro Bundler,我创建了react原生init项目 然后,我使用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 我

我创建了react原生init项目

然后,我使用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

我面临着这个错误


错误enoint:没有这样的文件或目录,请打开“android\app\src\main\assets\index.android.bundle”。有关详细信息,请使用-verbose标志运行CLI。错误:eNote:没有这样的文件或目录,请打开“android\app\src\main\asset\index.android.bundle”

您可以通过首先导航到应用程序中的“android\app\src\main文件夹”来实现这一点,并在那里创建一个名为assets的文件夹,因此在绑定时,react-native将在android\app\src\main\assets文件夹中创建index.android.bundle


希望它有帮助

您可以首先导航到应用程序中的“android\app\src\main文件夹”,并在那里创建一个名为assets的文件夹,因此在绑定react native时,将在android\app\src\main\assets文件夹中创建index.android.bundle

希望能有帮助