RN与android原生开发混合后的环境报错问题
RN与android原生开发混合后的环境报错问题
需要先安装nodejs
$ yarn --version
1.12.1
更新当前版本
yarn upgrade --latest
安装 | Yarn
https://yarnpkg.com/lang/zh-hans/docs/install/#windows-stable
================
到对应目录下用git bash here执行:
yarn
================
yarn start
npm install
================
rn混合后编译卡的问题,到D:\exchangespace目录下,cmd执行下面命令打包到D:\exchangespace\android\app\src\main\assets里面直接使用,只有rn的代码更新了才需要重新打包
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\
=================
有时候构建Android studio项目,会莫名出现
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
Error:resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found的问题,并且还会引起一系列其他的问题。
修改方法:
将compileSdkVersion修改成25,并将对应的buildToolsVersion修改成25.0.2
=================
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.facebook.react:react-native:+'
}
------------
compile --> implementation
testCompile --> testImplementation
testApi --> testImplementation
provided --> compileOnly
======================
不同严重程度可以按以下三种处理:
1.切换到project视图,删除.grade .idea 文件夹,clean project,
2.关闭android,重新打开编译
3.彻底清除缓存 File -> Invalidate Caches / Restart... (会清理掉本地修改的Gradle配置)
======================
Quit emulator
Quit Android Studio
Reopen Android Studio
Build > Clean Project
Run/debug your app onto your device/emulator again
======================
RN与android原生开发混合后的环境报错问题的更多相关文章
- Android项目开发填坑记-9patchPng报错
如果阅读体验不佳,请使用–> Github版 背景 之前写了一篇文章Android必知必会–NinePatch图片制作详细介绍了Android 9Patch图片的制作和一些Demo展示,这次说明 ...
- [RN] windows7 安装 Realm Studio 后,打开报错 A JavaScript error occurred in the main process
windows7 安装 Realm Studio 后,打开报错 报错如下: A JavaScript error occurred in the main process Uncaught Exce ...
- 关于在biweb 中安装完成后 首页上方报错问题的解决
在利用biweb进行网站开发的时候 首先得安装biweb 安装就是下一步,,,下一步....下一步 最后就成功了 .但是有种情况我总是竟让遇到,而已有的人安装会遇到 有的人安装就不会遇到,后 ...
- 解决Ubuntu(Linux)平台下Sublime Text 3 安装中文输入支持库后 开启gnome-terminal报错的问题
在Ubuntu下安装Sublim Text3后发现无法输入中文,按照此链接的方法解决后.然后用下列代码配置C++的编译系统: { "cmd":["g++",&q ...
- 安装VS 2015完成后,VS2012 打开报错
安装VS 2015完成后,VS2012 打开报错 打开VS2012Web项目,弹出错误提示: asp.net 4.0 has not been registered on the web server ...
- 在Linux上配置xampp后远程访问域名报错
在Linux上配置xampp后远程访问域名报错: New XAMPP security concept: Access to the requested object is only availabl ...
- 在把webpack作为本地开发依赖安装的时候报错
在把webpack作为本地开发依赖安装的时候报错 Refusing to install webpack as a dependency of itself 原因是package.json里的name ...
- 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...
- 修改了系统自带头文件后,Xcode会报错
1.Xcode自带头文件的路径 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Develo ...
随机推荐
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
https://yq.aliyun.com/articles/40353 ************************************* 摘要: 相信很多人和我一样,在编写Spring或者 ...
- 前端 HTML body标签相关内容 常用标签 表单标签 form 表单控件分类
表单控件分类 input标签: input标签 type属性的text,password,button按钮,submit按钮 input标签placeholder属性 标签上显示内容 input标签 ...
- "当前不会命中断点,没有与此行关联的可执行代码"可能和"断点位置不准确"有关
今天用VS调试代码遇到一件怪事,在函数结束前的return那一行打了断点,却报"当前不会命中断点,没有与此行关联的可执行代码".看了自己是debug模式,而且没有开启优化,不应该出 ...
- Spark中repartition和partitionBy的区别
repartition 和 partitionBy 都是对数据进行重新分区,默认都是使用 HashPartitioner,区别在于partitionBy 只能用于 PairRDD,但是当它们同时都用于 ...
- PHP实现装饰器
参考:https://www.cnblogs.com/onephp/p/6108940.html ●装饰器模式(Decorator),可以动态地添加修改类的功能 ●一个类提供了一项功能,如果要在修改并 ...
- 收藏住:金融&电商类原型模板重磅来袭,免费使用!
经常有很多产品经理和设计师想要各行业的产品原型模板,可以直接下载使用.现在分享下一个资源渠道:墨刀的原型模板. 上新了金融类和电商类的主要App设计原型,可以直接免费使用,具体包括: 金融类 招商银行 ...
- linux下nodejs安装以及如何更新到最新的版本
nodejs官网下载安装的源码文件,我这边下载的是node-v4.5.0-linux-x64.tar.xz 在linux命令行里输入: tar -xvf node-v4.5.0-linux-x64.t ...
- Dart server side call dll
今天,查看文档时发现Dart运行在服务端下可以调用本地实现(C/C++ dll). 我想应该有大用处 拿出来分享! 一 先做Dart库 //sse.dart library sample_synchr ...
- 从零开始一起学习SLAM | 为什么要学SLAM?
在<零基础小白,如何入门计算机视觉?>中我提到过,计算机视觉的研究目前主要分为两大方向:基于学习的方法和基于几何的方法.其中基于学习的方法最火的就是深度学习,而基于几何方法最火的就是视觉S ...
- C#将List<>转换为Json,将DataSet转成List<T>
转换 参考:https://blog.csdn.net/u011176794/article/details/52670339 参考:https://blog.csdn.net/my98800/ar ...