Questions tagged [jack-compiler]

Jack (Java Android Compiler Kit) is a now deprecated Android toolchain that compiles Java source into Android dex bytecode. It was intended to replace the previous Android toolchain, which consists of multiple tools, such as javac, ProGuard, jarjar, and dx.

Jack (Java Android Compiler Kit) is a now deprecated Android toolchain that compiles Java source into Android dex bytecode. It was intended to replace the previous Android toolchain, which consists of multiple tools, such as javac, ProGuard, jarjar, and dx.

The Jack toolchain provides the following advantages:

  • Completely open source

Available in AOSP; partners are welcome to contribute.

  • Speeds compilation time

Jack has specific supports to reduce compilation time: pre-dexing, incremental compilation and a Jack compilation server.

  • Handles shrinking, obfuscation, repackaging and multidex

Using a separate package such as ProGuard is no longer necessary.

22 questions
138
votes
1 answer

Error:Jack is required to support java 8 language features

When I tried to update my android project to use Java 8 after getting android studio 2.1 and android N SDK by adding compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } I had this…
humazed
  • 74,687
  • 32
  • 99
  • 138
68
votes
6 answers

How to enable Jack (Java Android Compiler Kit) in android studio

I am updated my androidstudio 2.1 stable.As per Android Studio 2.1 supports Android N Developer Preview Android studio 2.1 support Jack (Java Android Compiler Kit) compiler . How to add or use Jack in android studio? NOTE: The Jack toolchain is…
13
votes
4 answers

ButterKnife not working with Jack?

I just started a very simple project and tried to use both ButterKnife and Jack compiler, but it seems they do not cope with each other well. Gradle plugin version: 2.2.0-alpha5 in my module build.gradle I added: compile…
Marvin
  • 1,726
  • 1
  • 17
  • 25
8
votes
1 answer

Android compilation time with jack is extremely slow

I recently upgraded to Java 8 and my computer is subsequently using jack to compile my android builds. Since I've switched, building the app on my device is taking an enormous amount of time; usually between 3-5 minutes. I changed the server timeout…
SethCoast
  • 331
  • 1
  • 3
  • 16
8
votes
2 answers

Lambda causes compiler exception in Android Library Module

When I use a lambda expression in an Android Library Module, I receive a compiler exception com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found. Lambda expressions are compiling without error when…
6
votes
1 answer

Error:Execution failed for task ':app:transformJackWithJackForDebug'

I am facing following issue while running application. Error:Execution failed for task ':app:transformJackWithJackForDebug'. com.android.sched.scheduler.RunnerProcessException: Error during 'MethodIdMerger' runner on '': GC overhead limit…
dreamcoder
  • 1,233
  • 1
  • 11
  • 25
5
votes
1 answer

Android Studio: Execution failed for task app:transformClassesWithPreJackPackagedLibrariesForDebug

So, I using Android Studio 2.2 stable version now, I get following error on running app after update studio to 2.2 version: Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > java.lang.Boolean cannot be…
SBotirov
  • 13,872
  • 7
  • 59
  • 81
4
votes
0 answers

Android Studio debugger does not show local variables with JackOptions enable

After I enable JackOptions in build.gradle and use java version 1.8, Android studio debugger crashed. It does not show local variables.Is this the side effect of JackOptions? Any suggestions? My Android Stdudio version is 2.1.2, buildtoolsversion is…
3
votes
2 answers

Error:Lambda coming from jar file need their interfaces on the classpath to be compiled RxJava2

I am using RxJava2 along with lambda. IDE is Android Studio. Getting following error when compiling. Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies,…
coder
  • 41
  • 1
  • 7
3
votes
1 answer

no line numbers (e.g. for Log.getStackTraceString) with Jack compiler

We've switched over to the Jack compiler for our Android app to take advantage of Java8 features. However when we enabled minification (minifyEnabled true) we saw our app crashing in seemingly random places (it was all working fine with old…
3
votes
2 answers

Out of memory with jack

I'm testing the new compilation chain to start using lambdas. My build.gradle file contains: android { ... compileSdkVersion 23 buildToolsVersion "24 rc3" dexOptions { jumboMode true } defaultConfig { …
kingston
  • 11,053
  • 14
  • 62
  • 116
2
votes
2 answers

Unable to run project with Jack compiler

I updated my project to use Java 8 and the Jack compiler. The project compiles successfully but whenever I try to run it on a device I get the following error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task…
Alex Kombo
  • 3,256
  • 8
  • 34
  • 67
2
votes
1 answer

NoSuchMethodError using Android Jack toolchain

I'm trying to enable Java 8 new language features by using Jack toolchain. I've removed retrolambda and android apt plugin from my Android Project but I'm getting this error: Error:Execution failed for task…
notGeek
  • 1,394
  • 5
  • 21
  • 40
1
vote
1 answer

How can I get around Android's jack compiler giving Java heap space exceptions?

I recently tried to add the Apache Commons' Math library, but ran into the following exception during compilation: Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.…
Saites
  • 792
  • 7
  • 11
1
vote
2 answers

rxjava StackOverflowError exception in long chain

I build very long rxjava chain (with retrofit request) with a lot of operators: doOnNext, doOnError, switchIfEmpty, onErrorResumeNext, flatMap On some devices (Android 4.1 for example) it throws StackOverflowError exception when chain go by the…
Dmitry
  • 369
  • 4
  • 18
1
2