1、Failed to import new Gradle project: Could not install Gradle distribution from'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.

问题原因:中国连接gradle的地址被强了

解决方案:修改android studio设置Http Proxy->Auto-detect proxy settings

2、编译时报错“Compilation completed with 2 errors and 0 warnings in 9 sec
Gradle: 
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':teston:packageDebug'.
> org.bouncycastle.asn1.ASN1Integer.<init>(J)V

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.”

问题原因:引用了第三方包,未导入

解决方案:在build.gradle的

dependencies {
compile files('libs/android-support-v4.jar')}

中导入既可;

问题原因:代码中包涵了中文,导致编译时出现不可映射字符

解决方案:在build.gradle中加入

tasks.withType(Compile){
options.encoding='UTF-8'
}

编码定义即可;

android studio常见错误的更多相关文章

  1. Android studio 常见错误修改

    一,依赖冲突 All com.android.support libraries must use the exact same version specification (mixing versi ...

  2. Android Studio那些错误的问题们

    本片博客会记录关于Android开发工具Android Studio出错的那些问题,包括导入项目编译失败.时间过长,莫名其妙的歇菜等等... 问题 3facets cannot be loaded.Y ...

  3. Android Studio常见对话框(普通对话框、单选对话框、多选对话框、进度条对话框、消息对话框、自定义对话框)

    Android Studio常见对话框(普通对话框.单选对话框.多选对话框.进度条对话框.消息对话框.自定义对话框) 1.普通对话框 2.单选对话框 3.多选对话框 4.进度条对话框 5.消息对话框 ...

  4. Android studio 相关错误处理

    1.android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"  -->  在Activity中设置,表 ...

  5. Android开发常见错误类型一览表

    这是我的第一个博客,我会一直添加我在Android开发中遇到的错误,用来记录我开发中踩过的那些坑 ------------------------分割线------------------------ ...

  6. android studio 程序错误

    一.错误类型: com.android.tools.fd.runtime.BootstrapApplication cannot be cast to 成功修改方式 File --> Setti ...

  7. Android studio的错误:radle sync failed: Cause: failed to find target android-21 :

    这个错误在Android studio中经常出现,特别是你在编译不同的app的时候,到底是什么原因会导致该错误产生呢? 首先看错误信息,是找不到目标android版本-21导致的,这就很明显了,你的目 ...

  8. Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.

    今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...

  9. [转]编译Android源代码常见错误解决办法

    1. 编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when ...

随机推荐

  1. mysql 日志文件mysql-bin文件清除方法,和mysql-bin相关文件的配置

    默认情况下mysql会一直保留mysql-bin文件,这样到一定时候,磁盘可能会被撑满,这时候是否可以删除这些文件呢,是否可以安全删除,是个问题. 首先要说明一下,这些文件都是mysql的日志文件,如 ...

  2. ASP.NET 上的 Async/Await 简介

    原文链接 大多数有关 async/await 的在线资源假定您正在开发客户端应用程序,但在服务器上有 async 的位置吗?可以非常肯定地回答“有”.本文是对 ASP.NET 上异步请求的概念性概述, ...

  3. 如何限制一个类只在堆上分配和栈上分配(StackOnly HeapOnly)

    [本文链接] http://www.cnblogs.com/hellogiser/p/stackonly-heaponly.html [题目] 如何限制一个类只在堆上分配和栈上分配? [代码]  C+ ...

  4. C++中Cstring、wstring 和string互相转换总结

    通过前一篇文章<C++中string,wstring,CString的基本概念和用法>,对Cstring.wstring 和string有了一个了解.string是C++提供的标准字符串操 ...

  5. UIScrollView 的 delaysContentTouches

    UIScrollView 的一段说明: Because a scroll view has no scroll bars, it must know whether a touch signals a ...

  6. Node.js 字体格式转换 ttf2eot ttf2woff ttf2svg

    前几天为了查找字体转换工具网上搜索,既然用 Node.js 来做的工具. https://github.com/fontello/ttf2eot https://github.com/fontello ...

  7. ABAP ALV单个单元格状态编辑-简单版本

    *&---------------------------------------------------------------------* *& Report  ZPPR0024 ...

  8. ref 和 out

    两者都是按地址传递的,使用后都将改变原来的数值.很多人在论坛上解释说out是按数值传递,是错误的.简单的测试后可以知道out使用也能改变数值的,所以肯定是按照地址传递的.其次:rel可以把参数的数值传 ...

  9. SQL Server output经典使用

    output经典使用 分类: sql2012-02-16 18:17 409人阅读 评论(0) 收藏 举报 outputinserttabledeletegonull OUTPUT是SQL SERVE ...

  10. October 3rd 2016 Week 41st Monday

    Better to light one candle than to curse the darkness. 与其诅咒黑暗,不如燃起蜡烛. Sitting in the darkness and wa ...