android-jack-and-jill

Is Androids new Jack compiler really that slow?

依然范特西╮ 提交于 2019-12-05 21:01:43
On some of my Android projects I see that building got quite slow since using the new Jack compiler. I need it to use Java 8 features like lambdas. But the long building time is a bit disturbing. So I set up a new Android project. It contains just a MainActivity with one button which reacts on your click. package de.xappo.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends AppCompatActivity { Button button; @Override protected void

Android JACK compiler error after upgrade to latest support library

馋奶兔 提交于 2019-12-04 17:46:02
问题 --Android Studio 2.2.3 (Windows 10 64 bit) --Build Tools version 25 --Android Gradle Plugin Version 2.2.3 After upgrade to latest support libraries (25.1.0 from 23.4.0) and change of compile version (25 from 23) I get this error: Error:com.android.sched.util.config.PropertyIdException: Property 'jack.library.import' (in Options): element #7: The version of the library file '..\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes

Lambda expressions crash with IncompatibleClassChangeError in Android when using jack

℡╲_俬逩灬. 提交于 2019-12-03 16:18:22
问题 I am using Java 8 in my Android project. I have setup both Jack (In android application module) and Retrolambda (in other modules). The problem I am having is that my Lambda expressions crash in one specific scenario when I try to make it use class variable (and I can reproduce it in any module), in all others situations it works as expected. Maybe this is a standard Java behaviour, but I couldn't find any explanations so far. Would anyone know where the problem is? My class and crash below:

Android Jack mockito alternative

你离开我真会死。 提交于 2019-12-03 15:33:57
问题 Maybe is too soon to ask, but as Jack and Jill was announced today I get very excited with it. I really want to go for it, but they also state: Various tools that read .class files (such as JaCoCo, Mockito, and some lint checks) are currently not compatible with the Jack compiler. There is already an mockito alternative for jack compiler ? 回答1: Mockito doesn't generate any byte code at compile time and hence is not affected by the used compiler. Same holds true for dexmaker. (they don't have

Lambda expressions crash with IncompatibleClassChangeError in Android when using jack

陌路散爱 提交于 2019-12-03 05:33:11
I am using Java 8 in my Android project. I have setup both Jack (In android application module) and Retrolambda (in other modules). The problem I am having is that my Lambda expressions crash in one specific scenario when I try to make it use class variable (and I can reproduce it in any module), in all others situations it works as expected. Maybe this is a standard Java behaviour, but I couldn't find any explanations so far. Would anyone know where the problem is? My class and crash below: public class LambdaBugTest { private final String parentClassVariableString =

Jack and Android - Lambda runtime failure until clean build

♀尐吖头ヾ 提交于 2019-12-03 02:56:30
Seemingly at random, the apk that Android Studio installs is corrupted. It usually centers around lambdas (but it's a different one every time). I'm using Jack compilation and the latest version of everything (listed at the end). The problem persists until I do a clean build (and then everything's fine). The intermittent failures are a new phenomena. Things were stable with Jack and Java 8 features for awhile. Unfortunately, I can't pinpoint what changed before the flaky failures began. Example code: private static final Ordering<Foo> ORDER_BY_FOO = Ordering.natural().onResultOf(Foo::getId);

New Jack toolchain crashes when using android-apt plugin

╄→гoц情女王★ 提交于 2019-11-30 04:44:35
I'm trying to build a simple project with the new Jack toolchain . My project relies on android-apt plugin (it uses some annotation processing tool, but build error occures, even before I tried to add this tool). Here is my module build script (I'm using Android Studio 1.3 and gradle plugin 1.3.0 ): apply plugin: 'com.android.application' buildscript { repositories { jcenter() } dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.6' } } apply plugin: 'android-apt' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.netimen.ui.demo"

Android N Java 8 features (Jack compiler) and Kotlin interop

瘦欲@ 提交于 2019-11-29 19:29:44
Update 3. KOTLIN IS NOW OFFICIALLY SUPPORTED FOR ANDROID DEVELOPMENT . BY GOOGLE. YAAAAAAAAS! Update 2 : It looks like JetBrains is really committed to supporting Kotlin for Android in the long run . I'm a happy kotlin user :). Update : Hadi Hariri, from JetBrains, mentioned they're going to release some info on this topic . I will update this post once they do. === DEPRECATED STUFF NEXT === Google just released a preview for the upcoming Android N with some interesting features, the most notable being partial Java 8 language support . This is possible due to the new Jack toolchain Google is

Android Studio 2.2 and Jack are getting blocked by Avira Antivirus

帅比萌擦擦* 提交于 2019-11-29 13:29:18
So I update my project to use the new jack compiler, but for some unknown reason my AntiVir blocks the task transformClassesWithPreJackPackagedLibrariesForDebug It works if I disable AntiVir real-time protection. I really don't want to do that and I don't want to start putting my android project in the exception list. I am using Android Studio 2.2 and this is my build.gradle android { compileSdkVersion 24 buildToolsVersion "24.0.2" defaultConfig { minSdkVersion 21 targetSdkVersion 24 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" jackOptions { enabled true }

Disabling JACK in android compilation

别等时光非礼了梦想. 提交于 2019-11-29 11:32:22
Does anybody know how to completely disable jack while compiling AOSP (Master)? I've always had problems with jack , so I've just always turned it off by adding ANDROID_COMPILE_WITH_JACK := false in BoardConfig.mk (when compiling CyanogenMod). I'm now compiling aosp and it just seems to ignore this command. Note: I'm not really trying to solve any jack related issues I have, I'm trying to turn it off. I would recommend to use AOSP tag to build instead of master branch. For example, latest released Marshmallow is android-6.0.1_r43 tag. So let's look at clear_vars.mk which is responsible for