Kotlin and Jack unsupported (Android Studio 2.3.2) - android

I am getting this error while configuring kotlin plugin with Jack. I an using Android studio 2.3.2 currently.
Error:Kotlin Gradle plugin does not support the deprecated Jack toolchain. Disable Jack or revert to Kotlin Gradle plugin version
1.1.1.

If you are using latest IDE(3.0, preview version) it won't let you use Jack or you are using kotlin version above 1.1.1.
Jack has been deprecated because of the build time performance issue, It was mentioned in one of the session of google IO 2017. You can read this blog
In official documentation of Jack following warning is given:
The Jack toolchain is deprecated, as per this announcement. However, you may continue to use it to enable Java 8 language features until the replacement is available.
If you still want to use it, switch back you Android studio IDE to 2.3, and revert back to kotlin 1.1.1
EDIT
Kotlin by default supports Lambda expressions. If you want to use lambda expression in java with Kotlin also, you have to use Android Studio 3.0.

Related

Getting error when running Jetpack Compose samples

I wanted to run "Owl App" from Jetpack Compose sample apps but i got this error:
This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.
What's it for?
This issue causing due to using of newer version of gradle in the project.
You need to use the latest canary version of Android Studio.

Gradle KTS Build Files

Google released an updated version of Android Studio 3.5. After having updated to this version I get this warning below:
This project uses Gradle KTS build files which are not fully supported.
Some functions may be affected.
However, I believe this warning is restricted to developers who are using the Gradle’s Kotlin DSL to manage their dependencies. Instead of using groovy scripts.
Now android studio 4.0 is officially Support for Kotlin DSL script files(*.kts) so you need to update it and see the warning removed from your Event Log.
you can check below image and read from it official Document

Android Studio and Kotlin - not loading changes

To load a fresh APK I am required to clean every time before building. It is like the compiler isn't noticing my code changes.
Here are my configurations:
My project is entirely in Kotlin
Kotlin version 1.1.60
Gradle version 4.4
Android Build Tools version 3.1.0-alpha04
Android Studio 3.0 (stable)
Java 8
Databinding is enabled
Using Kapt
Instant run is disabled
I haven't confirmed if Java code would show the same problems or not.
Has anyone seen this and found a way around it?

Is it possible to use Android Gradle Plugin 3.0.0 with IntelliJ

I am trying to use plugin com.android.tools.build:gradle:3.0.0-alpha4 in IntelliJ.
But I've got the error
Error:This Gradle plugin requires Studio 3.0 minimum
The android gradle plugin version 2.3.3 supports Intellij.
I need IntelliJ due to I want to use AspectJ + Java 8 in IDE. Android Studio IDE doesn't support AspectJ yet, only gradle plugin.
Is it possible to use new version Android Gradle Plugin 3.0.0 with exactly IntelliJ, not Android Studio?
Thank you.
Android Studio 3.0 features will be merged in IntelliJ IDEA 2017.3.x which is not released yet, you can't update just Android plug-in separately, since it's a bundled plug-in and the synchronization with Android Studio is performed manually at JetBrains.
You can track the progress here.
As workaround you can add in gradle.properties this option:
android.injected.build.model.only.versioned=3
Full answer: https://stackoverflow.com/a/46634836/4050911
As the error states, you'll have to download Android Studio 3.0 (Canary) in order to use gradle plugin 3.0.0.
You need update your gradle version of both file Module level and Project Level as per the error '3.0.0' and then try to build the project

Lost Kotlin support in Intellij Idea 14.1

I had a android project in Kotlin that worked fine in Idea 14. But on update to 14.1, I seem to have lost support for Kotlin in the IDE. There is no option to create a new Kotlin file on right clicking a package, no syntax highlighting, auto complete etc. whatsoever for Kotlin files. The Kotlin plugin is installed and enabled.
Anyone else facing the issue?
What Version of the Kotlin-Plugin is installed?
Because it seems like a known bug:
Latest Kotlin Plugin not compatible with IntelliJ 14.1

Categories

Resources