ios - 找不到“ReactNativeNavigation/ReactNativeNavigation.h”文件
<p><p><strong>注意:</strong>请务必评论我应该提到什么来改进这个问题,而不是一味地贬低,我能够成功地为另一个项目设置带有 expo 的 React Navigation,并且会喜欢在这个项目中启动并运行 RNN。</p>
<hr/>
<p>我正在为我的 React Native 应用程序设置 React Native Navigation,特别是使用 Xcode 的 iOS。</p>
<p>我已按照说明更改了 <code>AppDelegate.m</code> 文件:</p>
<pre><code>#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation = [ jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
;
return YES;
}
@end
</code></pre>
<p>进行更改后,我收到两个 Xcode 错误:</p>
<pre><code>'ReactNativeNavigation/ReactNativeNavigation.h' file not found
Use of undeclared identifier 'ReactNativeNavigation'
</code></pre>
<p>我已确保遵循所有步骤,错误发生在 <a href="https://wix.github.io/react-native-navigation/#/docs/Installing?id=ios" rel="noreferrer noopener nofollow">React Native Navigation iOS documentation</a> 的步骤 3 中</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>尝试删除 node_modules 文件夹,然后在您的项目目录中执行全新的 npm install 或 yarn install。在运行 react-native 链接之后。</p></p>
<p style="font-size: 20px;">关于ios - 找不到“ReactNativeNavigation/ReactNativeNavigation.h”文件,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/54058375/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/54058375/
</a>
</p>
页:
[1]