Build:failed
今天集成国外支付的时候报错了,遇到了以下问题,如果有相同的问题,希望能帮到你,同时也记录以下,下次出现可以快速解决
1.
其实报错信息已经说了,需要在清单文件中加入 add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest
加完之后运行还是报错....
这个我也懵逼,到网上看了下说是加入
<application
android:appComponentFactory=""
然后运行
还是报错,错误信息是:(这里额外的说一下,如果你没看看到错误信息,那么你往上拉一下,或者你配置环境变量的话,直接在AS底部的Terminal这里使用命令,输入gradlew compileDebug --stacktrace或者gradlew compileDebugJavaWithJavac,尽量使用后者,感觉后者定位问题更好一些)
这个是国外支付的sdk,他用到了ConstraintLayout,点进去看一下
自己的项目没有用,所以就没有加入,在仔细看他们用的androidx的库,如果你没有用androidx的话肯定下面又一堆问题
加入依赖后
然后把依赖转换为androidx
转换完成后编译通过了,但是运行后发现注解不能用了,
我使用了butterknife,这应该是的问题butterknife,然后去看下
这是因为butterknife版本比较低,在这个版本还没有使用androidx,直接使用快捷键alt+enter健,会帮你把版本改到最新版本
运行还是报错
最后再加上
然后就能运行起来了,如果碰到不能运行的时候,直接加最后一项
compileOptions {sourceCompatibility JavaVersion.VERSION_1_8targetCompatibility JavaVersion.VERSION_1_8
}
Build:failed相关推荐
- 安装node-sass运行报错 Module build failed: TypeError: this.getResolve is not a function at Object.loader
在搭建vue脚手架 或者是在vue项目中,想使用sass的功能, npm install node-sass --save-dev //安装node-sass npm install sass-loa ...
- vue报错:Module build failed: Error: Node Sass does not yet support your current environment: Windows
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit ...
- add-migration Build failed.
add-migration Build failed. >add-migration JczInfoDateTime Build failed. 1编译解决方案,看是否报错,不管哪个有错误都会迁 ...
- Module build failed (from ./node_modules/babel-loader/lib/index.js) 错误解决
运行项目时报错 Module build failed (from ./node_modules/babel-loader/lib/index.js) 解决方案: 控制台输入 npm install ...
- Module build failed: Error: Missing binding
npm run dev启动前端工程以后终端出现超长报错,如下: > shop@2.4.0 dev > vue-cli-service serveINFO Starting developm ...
- Vue项目启动webpack报错Module build failed: Error: No PostCSS Config found in......
自己写的公司项目,今天需要提交到公司版本库,可是在本地启动正常的项目,拷贝到git文件目录下突然报错Module build failed: Error: No PostCSS Config foun ...
- Module build failed: Error: Cannot find module ‘node-sass‘ Require stack报错解决
Module build failed: Error: Cannot find module 'node-sass' Require stack报错解决 异常信息 解决方法 设置用淘宝镜像下载 npm ...
- Module build failed: Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.
Module build failed: Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. node-sass版本过高导致的,卸载 ...
- VUE报错:Module build failed: Error: Cannot find module ‘node-sass‘
报错代码: Module build failed: Error: Cannot find module 'node-sass'at Function.Module._resolveFilename ...
- 人人开源 VUE项目报错./src/assets/scss/index.scssModule build failed: Error: ENOENT: no such file or direct
Module build failed: Error: ENOENT: no such file or directory, scandir 'C:\Users\administrator\Deskt ...
最新文章
- mysql 主从报错
- bug ava.sql.SQLException: No more data to read from socket
- 【深度学习】Pytorch编写代码基本步骤思想
- python win10还是linux_在win10的Linux子系统(WSL)上搭载python编程环境
- 每月分享github上有意思的项目
- grub shell 错误_各种情况GRUB损坏进不了系统的解决方案
- (26)Vue.js组件通信—props 命名规则
- 在Unity中为模型使用表情
- linux--kubectl命令和docker命令
- Linux下安装Mysql详解
- ubuntu 17.10 如何设置合盖不关机
- 怎么把cad的图导入ps_CAD图纸快速高效导入PS的方法
- 简述java重载和重写的相同点_方法的重载和重写的异同之处
- MySQL 8 复制(一)——异步复制
- 阿里双十一 11 年:购物狂欢背后的技术演进
- 如何在浏览器中直接打开Word/Excel等Office文档?
- 成就系统实现(三)-架构设计
- 1.Storm-简介
- 利用认知偏差打造用户体验
- 求生之路2服务器搭建(基于LinuxGSM一键完成,完美支持8人)
热门文章
- 问渠哪得清如许,为有源头活水来之TCP / UDP
- 关于kernel2.6中USB host controller driver 的问题
- 在国内如何使用gmail_如何在Gmail中更快地键入电子邮件
- ZX297520V3T:Codec NAU88C22驱动调试
- JS中? ?和??=和?.和 ||的区别
- IntelliJ IDEA 项目中不小心把文件设置 Excluded 怎么恢复成原来的文件夹?
- 10款菜单导航代码_jquery 导航菜单_js 导航菜单_二级导航条下拉菜单(一)
- 提升源代码安全管控,从源头保护敏感数据
- 海康威视插件播放视频流
- 蓝桥杯题目练习(旅行家的预算)