当我构建android应用时,可能需要5分钟到15分钟。
如何解决带记忆的问题。有没有办法减少内存消耗?
如何使构建更快?
我的 build.gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.xxx.xxx"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
lintOptions {
abortOnError false
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.philliphsu:bottomsheetpickers:2.3.3') {
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'gridlayout-v7'
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.philliphsu:bottomsheetpickers:2.3.3'
compile 'com.vk:androidsdk:1.6.8'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
}
还有我的 gradle.properties
org.gradle.jvmargs=-Xmx1536m
org.gradle.daemon=true
org.gradle.parallel=true
同时添加报告
为什么要花这么长时间,以及如何加快项目的组装速度?
最佳答案
解决方法-不使用杰克。在这里阅读https://developer.android.com/studio/preview/features/java8-support.html
谢谢@BladeCoder