文章目录
React-Native Version:0.5.3
[React Native]错误: ‘config.h’ file not found / “:CFBundleIdentifier”, Does Not Exist[1]
重新配置 glob 文件.
$ cd <Your-Project-Folder>/node_modules/react-native/third-party/glog-0.3.5
$ ../../scripts/ios-configure-glog.sh
React Native启动报错的问题 getCurrentAppState:error 和 objectAtIndexedSubscript:
找到 RCTModuleMethod.mm
修改
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, "__unused") ||
RCTReadString(input, "__attribute__((__unused__))") ||
RCTReadString(input, "__attribute__((unused))");
}
这个函数插入 RCTReadString(input, "__attribute__((__unused__))") ||这行代码重新运行就行了。
Android Studio
Gradle、Kotlin更新下载太慢/卡
使用阿里云的国内镜像仓库地址,就可以快速的下载需要的文件,在项目根目录下的文件 build.gradle插入 :
buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
}
allprojects {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
}
然后选择重新构建项目就可以了
来自知乎
————————————————
本文针对React Native开发中常见的启动报错、配置问题及Android Studio的Gradle、Kotlin更新下载速度慢等难题,提供了详细的解决方案,包括修改RCTModuleMethod.mm文件、配置国内镜像仓库加速下载等实用技巧。
747

被折叠的 条评论
为什么被折叠?



