AndroidStudio3.0以上版本的坑
原文:https://blog.csdn.net/ytfunnysite/article/details/78864556
1、Error:Failed to resolve: com.android.support:multidex:1.0.2
Add Google Maven repository and sync project
Open File
Show in Project Structure dialog
Error:Failed to resolve: com.android.support:multidex-instrumentation:1.0.2
Add Google Maven repository and sync project
Open File
Show in Project Structure dialog
Error:(23, 0) Cannot set the value of read-only property ‘outputFile’ for object of type com.android.build.gradle.internal.api.LibraryVariantOutputImpl.
Open File
解决:
修改build.gradle脚本,增加google()
2、Error:(604, 5) error: expected reference but got (raw string) @+android:style/Animation.Translucent.
解决:
没有找到好的办法,最后修改gradle的版本,使用4.2.1或者
修改gradle.properties文件,增加以下参数配置
android.enableAapt2=false
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
解决:
修改gradle.properties文件,增加以下参数配置
android.enableAapt2=false
3、Error:Unable to load class ‘org.gradle.api.internal.component.Usage’.
Possible causes for this unexpected error include:
- Gradle’s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network) - The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart) - Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
解决:
修改gradle的版本
4、Error:No such property: FOR_RUNTIME for class: org.gradle.api.attributes.Usage
解决:
将gradle的版本从4.3.1降级到4.2.1
5、乱码
Error:(84, 35) 閿欒: 缂栫爜UTF-8鐨勪笉鍙槧灏勫瓧绗?
文件编码分为UTF-8编码和GBK编码,编译时使用UTF-8编码,就会导致某些页面乱码。
解决办法:
1、下方的UTF-8换成GBK
2、跳出提示选择”reload“,此时注释之类的乱码会显示正确。
3、右下角再选择UTF-8
4、跳出提示选择”convert“,此时编码从GBK转为UTF-8。
5、编译运行,就不会出现乱码错误了
6、如果还有提示,哪个文件出错,就如上转换该文件,问题解决!
AndroidStudio3.0以上版本的坑的更多相关文章
- CentOS 装hadoop3.0.3 版本踩坑
1.but there is no HDFS_NAMENODE_USER defined. Aborting operation. [root@xcff sbin]# ./start-dfs.sh S ...
- postman接口测试工具3.0版本的坑
今天用postman接口测试工具3.0版本被坑,找了半天,原来postman这个新版本有个坑啊 下面的get参数,第一行不管你填不填,都是无效的,可能是postman的一个bug吧
- Mysql8.0.17版本不能自动创建activiti表的坑
maven项目如下: 配置好数据库,和activiti的配置之后,开始执行流程部署 package com.yuanqiao.first_activiti.deployment; import jav ...
- SpringMVC4.0以后版本返回json格式数据问题
第一次写博文写的不好,但希望能帮助大家,有什么偏颇的地方希望大家多多斧正.在这个问题上困扰了我两天,这两天翻来覆去睡不着.一直在想这个问题.废话不多说下面进入正题. 1.创建创建web项目,加入Spr ...
- Appium适配Android7.0以上版本
Appium适配Android7.0以上版本 测试机型: 华为荣耀V9 安卓版本: Android7.0 appium版本: 1.65 说明: 公司新采购了一批安卓机器,拿了其中一台华为荣耀V9跑之前 ...
- SpringBoot之整合Redis分析和实现-基于Spring Boot2.0.2版本
背景介绍 公司最近的新项目在进行技术框架升级,基于的Spring Boot的版本是2.0.2,整合Redis数据库.网上基于2.X版本的整个Redis少之又少,中间踩了不少坑,特此把整合过程记录,以供 ...
- Hadoop生态圈-通过CDH5.15.1部署spark1.6与spark2.3.0的版本兼容运行
Hadoop生态圈-通过CDH5.15.1部署spark1.6与spark2.3.0的版本兼容运行 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 在我的CDH5.15.1集群中,默 ...
- 微信7.0以上版本fiddler、Charles抓包报HTTPS证书信任问题通报
通报:微信更新到7.0以后抓包公众号会有证书问题,抓包小程序直接不能打开 各位不用到处找了,也不用怀疑人生了,你没有问题.win10也没有问题.fiddler和Charles也没有问题,是因为微信更新 ...
- Android Studio 3.0正式版填坑之路
原文:https://www.jianshu.com/p/9b25087a5d7d Android Studio 3.0启动图 序言 总看别人的文章,今天尝试着自己来写一篇.在逛论坛时候,无意间发 ...
随机推荐
- bzoj5月月赛订正
已完成2/9(要准备中考啊QwQ) T1 考虑对所有数分解质因数,其中因子>sqrt(100000)的因子最多有一个,于是我们可以暴力维护<sqrt(100000)的因子个数的前缀和. 剩 ...
- 前端学习 -- Css -- 样式的继承
像儿子可以继承父亲的遗产一样,在CSS中,祖先元素上的样式,也会被他的后代元素所继承, 利用继承,可以将一些基本的样式设置给祖先元素,这样所有的后代元素将会自动继承这些样式. 但是并不是所有的样式都会 ...
- 【洛谷P2661】信息传递
题目大意:给定一个有 N 个点,N 条边且每个点的出度均为 1 的有向图,求该有向图的一个最小环. 题解:由于每个点的出度均为 1,可知可能的情况只有以下几种:一个环或多个环,一个环+一条链.因此,可 ...
- C++并发编程之std::async(), std::future, std::promise, std::packaged_task
c++11中增加了线程,使得我们可以非常方便的创建线程,它的基本用法是这样的: void f(int n); std::thread t(f, n + 1); t.join(); 但是线程毕竟是属于比 ...
- bzoj千题计划260:bzoj2940: [Poi2000]条纹
http://www.lydsy.com/JudgeOnline/problem.php?id=2940 SG 博弈入门推荐张一飞的<由感性认识到理性认识 ——透析一类搏弈游戏的解答过程> ...
- BSGS 算法
求解 A^x ≡ B mod C C是质数 的最小非负整数解 证明:A^x ≡ A^(x%φ(C)) mod C A^(x%φ(C)) ≡ A^(x-k*φ(C)) ≡ (A^x)/ A^(k*φ ...
- Spring RedisTemplate操作-事务操作(9)
@Autowired @Qualifier("redisTemplate") private RedisTemplate<String, String> stringr ...
- pgadmin导出excel
生成导入sql 第一行公式:="insert into province(code,name) values("&A2&",'"&B2& ...
- MySQL记录异常实体类设计
public class LogInfo { /// <summary> /// 应用名 /// </summary> public string AppName { get; ...
- html5 canvas结构基础
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...