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原生开发混合后的环境报错问题的更多相关文章

  1. Android项目开发填坑记-9patchPng报错

    如果阅读体验不佳,请使用–> Github版 背景 之前写了一篇文章Android必知必会–NinePatch图片制作详细介绍了Android 9Patch图片的制作和一些Demo展示,这次说明 ...

  2. [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 ...

  3. 关于在biweb 中安装完成后 首页上方报错问题的解决

    在利用biweb进行网站开发的时候 首先得安装biweb    安装就是下一步,,,下一步....下一步   最后就成功了 .但是有种情况我总是竟让遇到,而已有的人安装会遇到 有的人安装就不会遇到,后 ...

  4. 解决Ubuntu(Linux)平台下Sublime Text 3 安装中文输入支持库后 开启gnome-terminal报错的问题

    在Ubuntu下安装Sublim Text3后发现无法输入中文,按照此链接的方法解决后.然后用下列代码配置C++的编译系统: { "cmd":["g++",&q ...

  5. 安装VS 2015完成后,VS2012 打开报错

    安装VS 2015完成后,VS2012 打开报错 打开VS2012Web项目,弹出错误提示: asp.net 4.0 has not been registered on the web server ...

  6. 在Linux上配置xampp后远程访问域名报错

    在Linux上配置xampp后远程访问域名报错: New XAMPP security concept: Access to the requested object is only availabl ...

  7. 在把webpack作为本地开发依赖安装的时候报错

    在把webpack作为本地开发依赖安装的时候报错 Refusing to install webpack as a dependency of itself 原因是package.json里的name ...

  8. 运行编译后的程序报错 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 ...

  9. 修改了系统自带头文件后,Xcode会报错

    1.Xcode自带头文件的路径 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Develo ...

随机推荐

  1. 弱网测试之基于TP-LINK

    使用路由器做弱网测试应该是最真实的,网络工程师/运维工程师体会应该最深刻.这种方式测试成本也不高,比较推荐. 设置的方式不在赘述,参见使用手册,高级设置即可. 结束语: 这样测试的时候,测试机器连接该 ...

  2. java之httpClient 3.x、AsyncHttpClient1.9.x使用总结

    首先请大牛们见谅菜鸟重复造轮子的学习方式,本文适合新手看~ 下面使用的同步http是HttpClient 3.X的版本,不过早已不在维护,如果刚开始使用http,建议大家都换成4.X版本,别看下面的有 ...

  3. NYOJ 会场安排问题

    #include<iostream> #include<stdio.h> #include<string.h> #include<queue> #inc ...

  4. LigerUi自动检索输入

    var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASI ...

  5. COFF,amd64.vc90.mfc两个布署的问题

    今天解决了两个bug (1)一个是COFF文件损坏,因为装了vs2010和vs2013,搜索C:\Program Files(x86)文件夹下的cvtres.exe.出现了VC10和VC12的4个,x ...

  6. JavaScript 全栈工程师培训教程 - 阮一峰

    http://www.ruanyifeng.com/blog/2016/11/javascript.html https://github.com/ruanyf/jstraining 我现在的技术方向 ...

  7. 将中文字符串分割为数组 解决str_split中文乱码php

    首先来介绍str_split()这个函数: 它的作用是将字符串分割为数组: 例如: $str='abcde';str_plite($str); 打印结果如下:Array(    [0] => a ...

  8. (转)fabric 一个链码如何调用另一个链码

    使用开发模式测试 可以使用~/hyfa/fabric-samples/chaincode-docker-devmode/启动fabric,具体过程略 用同一个链码注册2个服务 root@2ee7b51 ...

  9. 题外话:Lua脚本语言存在的意义

    纯属个人见解. 大致来说:c/c++执行效率高,游戏中一些性能敏感的复杂计算需要用c/c++来实现,防止游戏卡顿和低帧率.这些复杂计算包括战斗逻辑,复杂AI,骨骼动画蒙皮骨骼点的坐标计算等等.但c++ ...

  10. 实时计算DStream下求平均值(reduceByKey or combineByKey)

    对NC市的卡口数据进行分析,大概所有卡口每15秒接入的有效数据在3000条左右,现在产品经理要求对这些数据进行拥堵分析,通过两个卡口之间的车辆行驶时长来判断道路的拥堵情况.具体算法不展开.其中我需要做 ...