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. SpringBoot-整合lombok

    添加lombok依赖 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lom ...

  2. PHP数组和字符串的处理函数汇总

    大部分数组处理函数array_chunk — 将一个数组分割成多个array_column — 返回数组中指定的一列array_combine — 创建一个数组,用一个数组的值作为其键名,另一个数组的 ...

  3. dfs1321

    比较抽象吧,看到题时一点思想也没有,参考了别人的代码才知道...渣渣 #include <iostream>#include <stdio.h>#include <str ...

  4. Ext.create细节分析

    var win1 = Ext.create('Ext.window.Window', { //实例化方法四 : 使用 完整的 Extjs 类名 width: 800, title: 'define t ...

  5. 30-Python3 正则表达式

    30-Python3 正则表达式 ''' re.match函数 ''' import re print(re.match('www','www.runoob.com').span()) print(r ...

  6. 如何设置locale

    什么是 locale? 是根据计算机用户所使用的语言,所在国家或者地区,以及当地的文化传统所定义的一个软件运行时的语言环境 locale定义文件放在目录 /usr/share/i18n/locales ...

  7. FluentScheduler:开源轻量级定时任务调度架构

    安装:FluentScheduler Install-Package FluentScheduler 一.控制台中使用 using System; using System.Collections.G ...

  8. ubuntu下ldd,查看程序动态库信息

    ldd  list, dynamic, dependencies linux-vdso.so. => (0x00007ffe9d9b6000) libstdc++.so. => /usr/ ...

  9. cocos2d-x getParent() 获得一个父类的一个node型指针,转换为父类类型

    void CenterLayer::zhanzheng(CCObject* pSender){ ((GameScene*)this->getParent())->showLayer(Gam ...

  10. myeclipse修改了安装目录名字打不开解决方法

    在MyEclipse XX目录下有一个MyEclipse.ini的文件,里面既有相对路径,又有绝对路径,修改绝对路径指向新的位置即可 来源:http://www.iteye.com/problems/ ...