According to Compose to Kotlin Compatibility Map, ComposeCompiler must be compatible with Kotlin version.
Is there this compatibility relation between Compose and ComposeCompiler?
Which one should be newer?
I didn't find any document/reference to describe the relation.
It is highly recommended that you use the plugin version matching the library you are using as that combination has received the most testing.
Also, the compose plugin must match the Kotlin compiler version it was intended for so it is recommended that you use the Kotlin compiler version the plugin was built for.
However the minimum current runtime version supported runtime is 1.0.0. This means you can use newer versions of the compiler with older versions of the library.
Beginning with 1.0.0, the Compose Compiler Plugin will feature detect the runtime and generate the code compatible with the runtime it is given. This allows new plugins to be used with older versions of the library. If a feature or optimization requires support from the library and it is not there, it is disabled.
Also, for binary compatibility, the runtime is required to support code generated from older version of the plugin. This allows older versions of the plugin to work with newer libraries.
Related
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
I am new in mobile development using Java and Kotlin, I had an application in Java which I needed to start in a new project.
When creating a new project in Android Studio, I checked Use androidx.* artifacts. After coping some dependencies from my old project, I had too many errors which I fixed by going to Refactor => Migrate to AndroidX
Now I want to now what is the difference between android and androidx packages.
Thanks in advance.
Android has been building up APIs that are backward compatable and has a lot of Android Support libraries that exist in developer APIs. To clean up this mess,Android introduced androidx libraries. AndroidX is a major improvement to the original Android Support Library. Like the Support Library, AndroidX ships separately from the Android OS and provides backwards-compatibility across Android releases. AndroidX fully replaces the Support Library by providing feature parity and new libraries
You can read about androidx here https://developer.android.com/jetpack/androidx
I'm learning flutter. The "Adding Firebase to Flutter" tutorial shows to use this; "com.google.gms:google-services:3.2.1" but the latest version seems to be 4.2.0
Also, I'd like to use suitable (latest?) version of packages from https://pub.dartlang.org/packages
Such as (currently):
firebase_core 0.3.1+1 and
google_sign_in 4.0.1+1
If I just choose the latest numbers I get a lot of compilation errors.
My Questions is: where can I find the latest supports/compatible version numbers for these various components?
The only thing I have found to work is to use:"com.google.gms:google-services:3.2.1" and to just keep downgrading pub package versions numbers until the compiler errors go away. I feel like there must be a more sane way to deduce the correct version numbers to use for various components.
Anybody have any insight into this issue?
Thanks
I need to see error messages but it's probably about AndroidX. If you have to check the changelog files of your plugins (by the way it's a good practice since sometimes readme's are not updated), you will probably see
Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.
google_sign_in 4.0.0 changelog
You can avoid AndroidX by using these packages listed or you can migrate to AndroidX with these instructions.
flutter create is not coming with androidx, it comes with android support libraries, but if you have Android Studio, it's easy to migrate it. In my case, I've migrated it.
I am using firebase in my android app. I have added firebase-messaging, firebase-database, firebase-auth, and firebase-storage libraries to my build.gradle.
When a new version of these libraries is available, Android Studio suggests to update the version to the new one.
But, the problem is that the latest versions of these four firebase libraries are not the same. Following were the versions when I last updated them to the latest version
My question is, if I update the firebase libraries to the latest versions available at a certain time, are they compatible with each other? Is it OK to update the library versions to the latest without doing any further investigations about the version compatibility?
The latest versions of everything should be compatible with each other. You can see them all listed in the documentation. The Play services gradle plugin will check to see if there are any possible incompatibilities between versions.
Line with yellow highlight you can see warning, they describes the latest library, and yes when firebase firm put library for end developers they also consider the old version features and other stuff, means they doesn't remove all features but they includes new features with new one version, so that is ok and no need to worry about updating a new version of firebase libraries.
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.