When I tried to assembleDebug in dev10, I gets inc...
# compose
i
When I tried to assembleDebug in dev10, I gets incompatible kotlin api error that is asking for 1.4
l
can you give more details on this?
i
"w: Runtime JAR files in the classpath have the version 1.3, which is older than the API version 1.4. Consider using the runtime of version 1.4, or pass '-api-version 1.3' explicitly to restrict the available APIs to the runtime of version 1.3. You can also pass '-language-version 1.3' instead, which will restrict not only the APIs to the specified version, but also the language features"
l
what is the kotlin runtime version you are using?
i
1.3.72
l
can you paste your whole gradle config for me?
i
root/build.gradle or app/build.gradle?
l
in this case i actually kinda need both
i
j
Just a shot in the dark, but we were using kotlin version
1.3.70
in our smoketest, you might consider downgrading to
1.3.70
instead of
1.3.72
, not sure if that will solve your issue though. You an also try suppressing the message with the flag they suggested in the message (
-language-version 1.3
) or maybe try skipping the runtime check (
-Xskip-runtime-version-check
). The root cause of the error is that we're getting super close to the Kotlin 1.4 release, but Kotlin 1.4 isn't released yet so you can't easily depend upon it, so you mostly need to suppress the warnings until it's released. Here is a gradle config fragment that might help (it's what we're using for a similar warning in androidx):
Copy code
allprojects {
  tasks.withType(KotlinCompile).configureEach {
        kotlinOptions {
            freeCompilerArgs += ["-Xskip-runtime-version-check"]
        }
    }
}
You could also try a Kotlin preview release candidate like
1.4-M1
for the runtime. We're in a bit of a twilight zone as we get closer to Kotlin 1.4. Please do post in the group if you find a configuration that works for you, as that may help others with similar constraints/setups.
i
I tried to use 1.4-M1, it didn't work.
l
Try 1.3.70. It looks like some folks are having luck with that?
i
I tried to use 1.3.70, I get same warnings
l
does the warning prevent successful compilation?
i
No
l
ok. i think we might just have to live with this warning for this release. We are in a wierd middle ground where the compiler isn’t really 1.3 and it’s not really 1.4 either, which makes some of these warnings a bit nonsensical. We will be moving closer to 1.4 very soon where i believe the line will be less blurred.