Build.gradle:
apply plugin: 'com.androID.application'androID { compileSdkVersion 24 buildToolsversion '25.0.2' defaultConfig { applicationID "..." minSdkVersion 14 targetSdkVersion 24 versionCode 1 versionname "1.0" jackOptions { enabled true additionalParameters('jack.incremental': 'true') } dexOptions { incremental true javaMaxHeapSize "4g" } } compileOptions { incremental true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro' } }}dependencIEs { compile filetree(include: ['*.jar'],dir: 'libs') androIDTestCompile('com.androID.support.test.espresso:espresso-core:2.2.2',{ exclude group: 'com.androID.support',module: 'support-annotations' }) compile 'com.androID.support:appcompat-v7:24.2.1' testCompile 'junit:junit:4.12' compile files('libs/TelegramNewAPIlibrary.jar') compile files('libs/TelegramNewConvert.jar')}repositorIEs { mavenCentral()}
build.gradle(模块应用):
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { jcenter() } dependencIEs { classpath 'com.androID.tools.build:gradle:2.2.3' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files }}allprojects { repositorIEs { jcenter() }}task clean(type: Delete) { delete rootProject.buildDir}
gradle.propertIEs:
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.enCoding=UTF-8 org.gradle.parallel=true org.gradle.daemon = true
禁用我的防病毒功能,并在项目中启用脱机工作.
系统Ram:4G
系统cpu:3.10 GH
AndroID Studio版本:2.2.3
任何人都可以帮助我吗?
解决方法 尝试将AndroIDStudio更新为3.0,升级gradle gradle:2.2.3 => gradle:3.0.0和buildtools buildToolsversion ’25 .0.2’=> buildToolsversion ’26 .0.2′ 总结以上是内存溢出为你收集整理的在android中缓慢构建gradle全部内容,希望文章能够帮你解决在android中缓慢构建gradle所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)