关于react-native引入第三方库,运行react-native link xxxxx后项目无法运行
最新版本的react-native中,官方表示将要移除
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 1 column 32 path $[0].name * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 3s
76 actionable tasks: 1 executed, 75 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
有关环境信息
info
React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Memory: 4.55 GB / 15.95 GB
Binaries:
Node: 10.15.3 - D:\node\node.EXE
Yarn: 1.16.0 - D:\yarn\bin\yarn.CMD
npm: 6.4.1 - D:\node\npm.CMD
解决方案
1.清除yarn缓存 yarn cache clean
2.清除npm缓存 npm cache clean -f
3.在项目文件夹中有一个package.json 文件,里面记录了该项目所有安装的依赖环境,若项目文件出现依赖环境报错的情况,则可以删除依赖node_module文件夹,在重新yarn install 一次 , 重新安装依赖。
4.对于项目出现出现.../.../debug/.../../文件夹报错,可能是缓存导致的问题,进入android文件夹下,输入命令 ./gradlew clean 命令清除缓存,也可使用android studio 中的菜单按钮的build下的clean project清除环境,在使用rebuild project 重新跑一次项目。
关于react-native引入第三方库,运行react-native link xxxxx后项目无法运行的更多相关文章
- Swift项目引入第三方库的方法
以下,将创建一个Swift项目,然后引入3个库: Snappy 简化autolayout代码的库 Alamofire HTTP网络库,AFNetworking作者写的 SDWebImage 图片加载, ...
- vue-cli创建的项目中引入第三方库报错 'caller', 'calle', and 'arguments' properties may not be...
http://blog.csdn.net/sophie_u/article/details/76223978 以在vue中引入mui第三方库为例: 虽然针对vue,有单独的vue-mui库可以使用,但 ...
- 基于webpack实现多html页面开发框架七 引入第三方库如jquery
一.解决什么问题 1.如何引入第三方库,如jquery等 二.引入jquery方法 1.下载jquery.min.js放到assets/lib下面 2.安装copy-webpack-plugin,将已 ...
- vue-cli创建的项目中引入第三方库报错'caller', 'calle', and 'arguments' properties may not be...
本文链接:https://blog.csdn.net/Sophie_U/article/details/76223978 问题: 在vue的main.js中引入mui.min.js时,报错. 如上,单 ...
- iOS-启动项目(二)引入第三方库
摘要 项目中很大几率会用到第三方库,通过 Pod 方式引入第三方库是效率很高的方式,这里介绍一个新的项目搭建 Pod 方式的环境,方便项目中引入第三方库文件. 刚创建的项目中如果需要用到第三方库,常用 ...
- cmake引入第三方库的debug和release版本之Windows版本
概述 本文将介绍cmak引入第三方库debug和release不同配置. Windows上,习惯将debug模式下生成的动态库名后缀添加D 以作和release区分.cmake创建一个项目A,A引入动 ...
- ios 引入第三方库 运行时找不到函数实现
今天引入webtrends 这个库,结果一直运行时找不到函数,纳闷了一下午! 后来发现,是other flag没有设置对,对于那些包含category用来扩展ios原始类型的库,链接的时候需要特别的链 ...
- iOS真机调试引入第三方库(如友盟等)编译时候,出现错误提示
用Xcode 7 beta 3在真机(iOS 8.3)上运行一下工程,结果发现工程编译不过.看了下问题,报的是以下错误: MARK:解决方法:在building Setting 中设置bitCode ...
- Android Studio使用Gradle引入第三方库文件
原文链接:https://blog.csdn.net/qiutiandepaomo/article/details/81538937 使用AndroidStudio开发Android应用的时候,会经常 ...
随机推荐
- codeforces 149D Coloring Brackets (区间DP + dfs)
题目链接: codeforces 149D Coloring Brackets 题目描述: 给一个合法的括号串,然后问这串括号有多少种涂色方案,当然啦!涂色是有限制的. 1,每个括号只有三种选择:涂红 ...
- iOS中数据类型转换--遇到则记录
1.NSString转NSNumber 使用情景:CoreData存储数据,其中一个为价格,CoreData里面定义为float 用文本输入框得到的数据类型是NSString,将NSString转换成 ...
- Asp.net 字符(一)
1.字母大小写处理 private string GetChangedStr(string oldStr, strType type) { string newStr = ""; ...
- 通俗易懂的Nhibernate教程(2) ---- 配置之Nhibernate配置
在上一个教程中,我们讲了Nhibernate的基本使用!So,让我们回顾下Nhibernate使用基本的步骤吧 1.NHibernate配置 ----- 这一步我们告诉了Nhibernate:数据库 ...
- vs 2015 编译cocos2dx 报错
VS 2015 compiling cocos2d-x 3.3 error “fatal error C1189: #error: Macro definition of snprintf confl ...
- Hello Shell
shell是Linux平台的瑞士军刀,能够自动化完成很多工作.要了解UNIX 系统中可用的 Shell,可以使用 cat /etc/shells 命令.使用 chsh 命令 更改为所列出的任何 She ...
- /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
[root@localhost nagios]# make install-webconf/usr/bin/install -c -m 644 sample-config/httpd.conf /et ...
- [Tunny]Git常用命令与入门
[黄映焜/Tunny,20140709] Git 仓库就是那个.git 目录,其中存放的是我们所提交的文档索引内容,Git 可基于文档索引内容对其所管理的文档进行内容追踪,从而实现文档的版本控制..g ...
- c# 从DataGridVieew导出到excel
public static bool DataGridViewToExcel(DataGridView dataGridView, bool isShowExcel) { int rowsQty = ...
- ftp 报错 200 Type set to A
最近在使用ssis 从ftp服务器抓起文件到本地的时候,发现连接ftp出错 200 Type set to A 解决办法: ftp connection 中 设置UsePassiveMode 为Tru ...