NSBundle (null) initWithPath failed because the resolved path is empty or nil
+ (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value 方法中NSString *i18nFolderPath = [bundle pathForResource:language ofType:@"lproj"];获取到的i18nFolderPath为nil,导致mj_defaultI18nBundle = [NSBundle bundleWithPath:i18nFolderPath];执行有异常提示: NSBundle (null) initWithPath failed because the resolved path is empty or nil
给出示例工程和运行环境
不对工程做国际化就会出现这个问题
我是swift开发,我也遇到了相同内容的“警告”,程序倒是可以运行,没什么异常。所以也反馈一下 警告内容如下: NSBundle (null) initWithPath failed because the resolved path is empty or nil
造成这个警告的语句是如下,注释掉就没有警告了(当然程序也就不正常了) tableView.mj_header = MJRefreshNormalHeader()
您好,邮件已收到。
我这边升级到xcode 26.0也出现了
用模拟器就出现了这个问题,真机好像正常
check this out fix/Bundle-path-nil #1629