AndroidStudio使用记录
来源:互联网 发布:sql 选取第二大 编辑:程序博客网 时间:2024/06/10 09:25
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">一</span>
今天打开AndroidStudio, 莫名其妙的全部工程都报错了,丢了个这样的错误:
Gradle sync failed: Could not run build action using Gradle installation 'D:\android-studio-2.0-pre4
解决方法:File -> Settings -> 搜索Gradle 配置下Gradle的路径,并且把离线编译选项给勾上。
结果发现,问题还是不能得到解决,升级安装了最新的SDK,重新打开AndroidStudio就OK了。
二
新建项目出现没找到资源的错误!找不到com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
<span style="font-size:18px;">/路径/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. </span>这是API 23(Android 6.0)中的资源文件,而查看build.gradle,编译的SDK只是为21,我们可以尝试将compileSdkVersion设为23(如果sdk里面没有下载API 23的,则需要下载),问题解决!
如果不想下载API 23怎么解决呢?降低appcompat的版本:将build.gradle里面的dependencies对应的appcompat版本降低:
将compile 'com.android.support:appcompat-v7:23.0.1'的版本改为:'com.android.support:appcompat-v7:22.2.1'
三
<span style="font-size:18px;">Error:Error converting bytecode to dex:Cause: java.lang.RuntimeException: Translation has been interrupted Error:Execution failed for task ':app:transformClassesWithDexFor_360Debug'.> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value </span>
项目中存在相同的jar包,导致运行失败!
解决办法:删除相同的jar包即可,一般是你刚才添加了某个依赖有冲突
1 0
- AndroidStudio使用记录
- AndroidStudio使用问题记录-1
- AndroidStudio使用中的问题记录
- 记录一点AndroidStudio使用SVN的经验
- AndroidStudio使用过程中的问题记录
- Android开发之AndroidStudio使用记录
- AndroidStudio学习记录---初触AndroidStudio
- 记录使用androidstudio IDE方案替换eclipse+ant
- androidstudio小知识记录-Genymotion安装与使用
- AndroidStudio学习记录
- androidstudio BUG 记录
- AndroidStudio 异常记录
- AndroidStudio实战学习记录
- androidStudio使用
- androidstudio使用
- AndroidStudio使用
- AndroidStudio 代码混淆proguard记录
- AndroidStudio问题记录:sRGB warning
- shell脚本报错:"[: =: unary operator expected"
- ASP.NET动态绑定HighCharts图表控件
- cell 重用 视图叠加 -- 转自互联网bkjia.com
- jquery选择器 之 获取父级元素、同级元素、子元素
- android:windowSoftInputMode属性详解
- AndroidStudio使用记录
- [leetcode] 8. String to Integer (atoi) 解题报告
- POJ 1811 Prime Test(素数判定Miller-Rabin+素因子分解Pollard-rho)
- top 使用技巧
- sf4j+logback
- 线程操作
- 设计模式——观察者模式 Java源代码
- Educational Codeforces Round 3 B. The Best Gift
- MyEclipse使用DB Browser连接Oracle数据库