Ich überprüfte alle Fragen mit Antworten über langsam Gradle Build. (Zum Beispiel here, here und ...) .aber Build-Gradle in meinem Projekt ist zu langsam. manchmal das Gebäude dauert ungefähr 5-8 Menuette, i in vielen Standorten gesucht, und jetzt im müdeLangsam bauen Gradle in Android
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 (Modul app):
// 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
mein Anti-Virus ist deaktiviert und offline arbeiten ist im Projekt aktiviert.
System-RAM: 4G
System-CPU: 3.10 GH
Android Studio Version: 2.2.3
jeder kann mir helfen?
Erzeugen Sie einen Build-Scan (https://plugins.gradle.org/plugin/com.gradle.build-scan) oder führen Sie zumindest die Option --profile aus, um herauszufinden, * was * langsam ist und was verbessert werden soll. –
: app: transformJackWithJackForDebug >> das ist langsam. Ich denke, es ist für Jack-Option – b4hr4m
Ich weiß nicht viel über Android, und habe keine Ahnung, was diese das ist oder was es tut. Aber wenn das langsam ist, hast du wirklich ein Gradle Langsamkeitsproblem? Oder haben Sie ein langsames Problem mit der Jack Transformation? –