android studio 使用问题 解决方法
1、
Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 3
解决:
在build.gradle中添加:
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.myapplicationname.app"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
//====================Add below two line=============
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
useLibrary 'org.apache.http.legacy'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile files('libs/gcm.jar')
compile 'com.android.support:multidex:1.0.1'
compile 'org.apache.httpcomponents:httpcore:4.4.4'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: "httpclient"
}
//facebook sdk
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'com.paypal.sdk:paypal-android-sdk:2.12.4'
//facebook sdk
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
}
android studio 使用问题 解决方法的更多相关文章
- 安装Android studio出现'tools.jar' seems to be not in Android Studio classpath......的解决方法
安装Android studio出现'tools.jar' seems to be not in Android Studio classpath......的解决方法 原创 2015年07月31日 ...
- Android Studio 常见问题及解决方法
一.Error:All flavors must now belong to a named flavor dimension 问题描述: Error:All flavors must now bel ...
- android studio提示信息乱码解决方法
在build.gradle文件中加上 android {compileOptions.encoding = "GBK"}就好了
- Android开发-Android Studio问题以及解决记录
[Android开发] Android Studio问题以及解决记录 http://blog.csdn.net/niubitianping/article/details/51400721 1.真 ...
- android studio 添加get,set方法快捷方式
android studio 添加get,set方法快捷方式
- Android Studio 2.3.3 出现Error:(26.13) Fail to resole: com.android.support.appcompat永久解决方法
Android Studio 出现Error(26.13):Fail to resole:com.android.support.appcompat-v7.28_ Install Repository ...
- 安装android studio时候弹出unable to access android sdk add-on list解决方法
本文转载自:http://www.cnblogs.com/rancvl/p/6081791.html Android Studio First Run 检测 Android SDK 及更新,由于众所周 ...
- Android Studio INSTALL_FAILED_UID_CHANGED的解决办法
使用Android Studio开发Android应用,把Android应用调试安装在手机上时,出现了安装失败的提示:INSTALL_FAILED_UID_CHANGED. 上网找了很多资料: 1.说 ...
- android studio 更新Gradle版本方法
在导入其他项目时,经常由于gradle版本不一致而导致不能编译 解决方法: 第一步: 按提示点击让它下载,其实目的并不是要它下载,因为这样速度会很慢,这样做只是为了让它在本地创建相应的目录结构 第二步 ...
随机推荐
- 1. 从系统架构到Hello World
Android起源与发展: Android操作系统最初在2003年的时候由Andy Rubin开发,主要支持手机.2005年8月由Google收购注资.2007年11月,Google与84家硬件制造商 ...
- Android对应用程序签名
1.首先签名是个什么东西. 应用程序签名就是为你的程序打上一种标记,来作为你自己的标识. 2.为什么要进行数字签名 这是Android系统的要求,每一个应用程序必要要经过数字签名才可能安装到系统中,能 ...
- mysql GROUP BY 与 ORDER BY 查询不是最新记录
转载:http://blog.csdn.net/qvbfndcwy/article/details/7200910 鉴于项目的需要,就从网上找到该文章,文章分析得很详细也很易懂,在android里,( ...
- 关于Linux与windows传递文件乱码问题
linux下一般是采用utf-8的编码,而我们在windows上编辑文件时是gb2312的编码.所以导致中文编码会乱码.要更正这个问题实际上很简单只要把文件转换成utf-8编码格式然后再导入就ok啦. ...
- 【SQL篇章】【SQL语句梳理 :--基于MySQL5.6】【已梳理:ALTER TABLE解析】
ALTER TABLE 解析实例: SQL: 1.增加列 2.增加列,调整列顺序 3.增加索引 4.增加约束 5.增加全文索引FULL-TEXT 6.改变列的默认值 7.改变列名字(类型,顺序) 8. ...
- gdb 定位 oops call trace
[ 1.454380] BUG: unable to handle kernel NULL pointer dereference at 00000000000005d0[ 1.47402 ...
- 三:shell运算符
1:declare命令 shell默认是字符串型 如果需要加减乘除,需要定义为整型declare命令:改变默认变量的类型decalre [+/-] [选项] 变量名 -给变量 ...
- mysql 性能优化方案 (转)
网 上有不少mysql 性能优化方案,不过,mysql的优化同sql server相比,更为麻烦与复杂,同样的设置,在不同的环境下 ,由于内存,访问量,读写频率,数据差异等等情况,可能会出现不同的结果 ...
- [转]Oracle Form 触发器执行顺序
Trigger 不是数据库中的触发器,不过功能类似,都是当某个事件发生的时候会触发. Trigger中可以编写代码,当对应事件发生的时候就会执行该Trigger中的代码. Oracle Form中的T ...
- Java Web之JSP技术
JSP全称是Java Server Pages,它和servle技术一样,都是SUN公司定义的一种用于开发动态web资源的技术.JSP这门技术的最大的特点在于,写jsp就像在写html,但它相比htm ...