使用Expo工具

在mac上安装expo,如果是权限问题可以参考以下解决方法
https://blog.csdn.net/testcs_dn/article/details/78869419
https://jingyan.baidu.com/article/9c69d48ff88b3813c9024e9d.html

这是第二条链接的说明:对于Mac OS X 10.11 El Capitan用户,由于系统启用了SIP(System Integrity Protection), 导致root用户也 没有权限修改/usr/bin目录。按如下方式可恢复权限。
屏蔽方法:重启Mac,按住command+R,进入recovery模式。选择打开Utilities下的终端,输入:csrutil disable并回车,然后正常重启Mac即可。

报错: react native fsevents unavailable (this watcher can only be used on Darwin)

解决的办法参考链接
npm r -g watchman
brew install watchman
注意:这里我使用npm install watchman还是有问题的,但是换成brew安装后没有问题

react-native run-ios报错

Could not find iPhone 6 simulator参考链接

Command+shift+.可以显示/隐藏以"."开头的文件或者文件夹

解决 React-Native mac 运行报错 error Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by ope

地址,如果按照以上的还有问题使用sudo跑下https://www.cnblogs.com/stevexu/archive/2019/04/21/10745769.html

如果显示像下面图片一样,但是模拟器没有安装程序,可能需要kill一下进程,下面的链接很详细的说明了各种情况

react-native run-ios遇到的问题说明:https://juejin.im/post/5ca2e560e51d456d3550dd5c

解决node.js - Node already installed, it’s just not linked

解决链接:http://www.itkeyword.com/doc/7125537006697543345/node-already-installed-its-just-not-linked

解决升级到Xcode10,react native项目运行报错问题

我遇到的错误是下面这个或者没有config.f的,**

这个链接很有用**

错误一:Xcode 10: Build input file double-conversion cannot be found
error: Build input file cannot be found: '../node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc'
configure: error: in `../node_modules/react-native/third-party/glog-0.3.4'

解决链接:https://blog.csdn.net/chensenp/article/details/83543724

完美解决:"library not found for - "

该文章提供了很多的解决方案:https://blog.csdn.net/liujia216/article/details/53112709
我也遇到了该问题,但是项目的这个库是别人封装的,所以我暂时是把该库移除了

React Native 日常报错 ‘config.h’ file not found

解决链接:https://blog.csdn.net/qq_28978893/article/details/78720488

修改模拟器

react-native run-ios --simulator "iPhone X" //iPhone X是需要使用的模拟器

真机调试链接

真机调试查看连接的设备

adb devices

注意:需要确保你的电脑和手机设备在同一个Wi-Fi环境下,要不然我的会出现闪退
真机调试修改和查看

把就项目放到android studio报错

Error:(24, 0) Could not find method implementation() for arguments [directory ‘libs’] on object of t

这种方式会有警告,告诉你compile过时了,你可以选择升级gradle,解决链接

Android Studio 报错:Could not find com.android.support:appcompat-v7:28.0.0-beta01.

加上google(),解决链接

AManifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).Suggestion: add ‘tools:replace="android:appComponentFactory"’ to element at AndroidManifest.xml:5:5-20:19 to override.

解决链接
添加tools

android studio 历史版本下载地址

历史版本下载地址

android studio mac完全卸载

https://blog.csdn.net/elonspace/article/details/51800949

gradle各个版本下载

http://services.gradle.org/distributions/

Lint found fatal errors while assembling a release target. 问题的解决方案

https://www.jianshu.com/p/9a3d4dddfcb2

Android Studio编译报Couldn’t follow symbolic link错误

Could not list contents of '/Users/sunrifa/sendiWork/special_form_app_react_v2/node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'. Couldn't follow symbolic link.

https://www.jianshu.com/p/11a304b670e5

Error: EACCES: permission denied, mkdir 类的问题

https://stackoverflow.com/questions/49679808/error-eacces-permission-denied-mkdir-usr-local-lib-node-modules-node-sass-b

找不到资源,可能需要统一版本依赖

Android resource linking failed
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v26/values-v26.xml:15: error: style attribute ‘android:attr/keyboardNavigationCluster’ not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/fontStyle not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/font not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/fontWeight not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/fontVariationSettings not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/ttcIndex not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/startX not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/startY not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/endX not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/endY not found.
/Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2690: error: resource android:attr/offset not found.
error: failed linking references.

dependencies {compile fileTree(dir: 'libs', include: ['*.jar'])testCompile 'junit:junit:4.12'compile 'com.android.support:appcompat-v7:23.1.1'compile 'com.facebook.react:react-native:0.54.2'compile 'com.google.android.gms:play-services-gcm:11.0.4'compile 'me.leolin:ShortcutBadger:1.1.8@aar'
}

修改上面的三个值,保持依赖版本统一

Cannot add task ‘wrapper’ as a task with that name already exists

https://stackoverflow.com/questions/53709282/cannot-add-task-wrapper-as-a-task-with-that-name-already-exists

react-native-keychain: 错误: 找不到符号 符号: 类 StrongBoxUnavailableException

重新装下 yarn add react-native-keychain@3.0.0,装后打开报错的文件,发现代码少了报错的代码,不知是否是之前开发添加的

Invoke-customs are only supported starting with Android O (–min-api 26)

https://www.jianshu.com/p/434928537a90

React Native version mismatch 错误

https://blog.csdn.net/awy1988/article/details/80336913

有可能是你在跑两个react-native不同的版本时也会有这个问题

特批项目

升级gradle为3.4.1
重新安装react-native-keychain,解决找不到类的问题
升级video为4.1.0
修改react-native-device-info的依赖包中的play-services-gcm的版本为15.0.1

react-native run-ios命令失败(PCH问题),但是在xcode中构建成功

http://www.voidcn.com/article/p-owrbmtsz-btr.html
把项目根目录下的ios/build目录删除,重新构建

Error: Duplicate resources

https://stackoverflow.com/questions/47084810/react-native-android-duplicate-file-error-when-generating-apk/49589616#49589616
需要修改react-native/react.gradle,暂时使用了该解决方案,需要修改node_modules里的模块不好

个人证书打包ios教程

https://www.jianshu.com/p/924e2a0d2236
本人没试过,记录下,有需要再用

调试react-native跨域问题

在chrome商店下载扩展 Allow-Control-Allow-Origin: *

mysql错误:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

解决链接

有时react-native编译ios会出现一些问题,一般处理是删除项目下ios的build目录、关闭终端和模拟器重新跑、还有这个地址

链接器命令失败,退出代码1(使用-v查看调用)在xcode 10和ld:找不到-lFirebaseCore库

https://www.soinside.com/question/U6dwRm6i5m89d2BABGJ7fL

如果没有手动的react-native软件包 #18472, iOS main.jsbundle将不会自动创建或更新

https://translate.google.com/translate?hl=zh-CN&sl=en&u=https://github.com/facebook/react-native/issues/18472&prev=search

react native笔记-个人记录-初始化工程遇到的问题相关推荐

  1. React Native的安装和初始化(android /ios)

    2019独角兽企业重金招聘Python工程师标准>>> 好久没有写东西,最近想学一下React Native,借此写一写笔记 React Native 的安装 使用React Nat ...

  2. vscode android调试,使用VsCode开发调试React Native笔记

    Prerequisites: Android SDK Emulator/adb等环境先准备好 Steps: 启动simulator C:\AndroidSDK\Android\sdk\tools> ...

  3. Android React Native 笔记(二):Component生命周期

    注意 绝对不要在componentWillUpdate和componentDidUpdate中调用this.setState方法,否则将导致无限循环调用. 来自 <React Native 中 ...

  4. Android React Native 笔记(一):基础

    参考,来自 <核心组件与原生组件 · React Native 中文网> 定义 由于 React Native 组件就是对原生视图的封装,因此使用 React Native 编写的应用外观 ...

  5. Learning React Native笔记

    React Native作为一个新事物,相关的资料还不多 官方的文档比较简单,缺少一些系统的例子 在对React Native的应用中,迫切的想学习一些别人的最佳实践.所以想通过看书系统的学习下 之前 ...

  6. react native 问题点

    问题点一:安装了react-native-vector-icons后,编译出错 版本: "react": "16.2.0","react-native ...

  7. React Native桥接器初探

    本文假设你已经有一定的React Native基础,并且想要了解React Native的JS和原生代码之间是如何交互的. React Native的工作线程 shadow queue:布局在这个线程 ...

  8. 混合开发架构|Android工程集成React Native、Flutter、ReactJs

    混合开发架构|Android工程集成React Native.Flutter.ReactJs 架构设计说明 创建安卓原生工程 创建Flutter 集成嵌入原生工程 创建React Native 解决R ...

  9. React Native学习笔记一之搭建开发环境

    因为项目需要,今天开始正式学习React Native,先来搭建个开发环境 忐忑的心情 因为项目比较急,而且客户要求使用React Native开发,只能先学点基础然后在项目中使用的时候,边做边学了, ...

最新文章

  1. web安全攻防演练网站 靶机 测试环境 收集
  2. laravel实现多数据源配置和读写分离
  3. ios15之取消UITabbleViewCell的高亮效果
  4. SmartSql For Asp.Net Core 最佳实践
  5. java 堆大小_适当的Java堆大小的5个技巧
  6. ReactNative——打包发布
  7. datagridview 当前上下文中不存在bind_全面解析JavaScript中this指向问题
  8. mbed试玩—高速开发MCU应用(基于FRDM-KL25Z)
  9. XDUOJ 1125 Judgement of Orz Pandas
  10. Java中list集合去重方法
  11. excel 方框打钩
  12. 智能对话机器人产品之 IBM Watson 三年投资回报率 383% | Chatopera
  13. 青春饭碗——程序员,年纪大了怎么办?
  14. 目前是大专学历如何快速提升到本科学历?学历提升有哪几种形式呢?
  15. react组件React slick的使用
  16. 快应用开发中常见的几个版本号~~
  17. android bp文件_Android.bp学习笔记
  18. 计算机与技术专业学e语言庅,计算机科学与技术专业课程有哪些 主要学什吗
  19. 学习 Civil 3D二次开发从哪儿开始?
  20. 重装系统Win7步骤

热门文章

  1. matlab 数值解 期权顶级啊,潮盈期权院高胜率交易技巧系列之二----期权交易策略及基于MATLAB统计套利介绍...
  2. eclipse--python开发环境搭建
  3. TFIDF java实现
  4. jsoup的Elements类
  5. C++ STL--stack/queue 的使用方法
  6. 什么是好的错误消息? 讨论一下Java系统中的错误码设计
  7. 阿里云峰会|数据库也能自动驾驶?DAS全天候给你保驾护航!
  8. 码上用它开始Flutter混合开发——FlutterBoost
  9. 理解卷积神经网络的利器:9篇重要的深度学习论文(下)
  10. 极验创始人吴渊:恶意流量威胁新趋势,洞察网络黑产3大核心本质