-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK52] [expo-updates] android build failure: Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (17) and 'kspDebugKotlin' (21). #33107
Comments
Same issue, any solution? "expo": "^52.0.0", |
I was unable to reproduce the issue, and the repository link is broken. Could you create a minimal reproduction for us to investigate the problem further? I've created a fresh project with: |
Hey, I made it private mistakingly. I have made it public now. I am using the same versions as mentioned by you. Also, I have removed the actual I tried an eas build too, but it failed. I have tried 2 kotlin version - |
I am getting the same error also (although I suspect mine was related to moving from a 2019 MacBook Pro to a new M4 Max MacBook Pro (and I have had to reinstall several coding related packages to move from Output from my latest Android development build:
So this issue makes me feel like I now have my new environment set up correctly and the error is with |
Can you send me your build logs or link to the build on the EAS? |
@lukmccall I am also able to build with the above command you run. However, I am not able to build with eas. Because of this, I am not able to create production builds. Adding the logs here:
|
For what it's worth, I'm getting the exact same error message after upgrading to SDK 52 in my own project and trying to run locally.
I was also able to replicate the same issue with the same repro example provided above in the repository expo-update-test. Environment
Edit: Reverting to SDK 51 resolves the issue and the app builds and runs fine on the emulator |
Which version of java are you using (what is the output of
to the |
Same problem for me: I have Java 21 installed in my machine and my project used to build fine with Expo 51, but as soon as I upgraded to Expo 52 I started to get the error below:
The problem seems to be coming from |
expo-updates in sdk 51 still uses kapt than ksp. |
Im also getting this
@brentvatne I fixed it with kotlinVersion. I do not know if its good or not. |
…33148) # Why fix incompatible jvm target error from expo-updates when using jdk 21 ``` Execution failed for task ':expo-updates:kspDebugKotlin'. > Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (17) and 'kspDebugKotlin' (21). ``` fixes #33107 # How RNGP is not able to enforce jvm toolchain version in KSP. this pr tries to add jvm toolchain inside the ksp configuration. also introducing a `applyKspJvmToolchain()` from core, so that we can control the jdk version from core to reduce maintenance cost. # Test Plan - ci passed - `JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:assembleDebug` in bare-expo. the new jdk inside android studio is jdk 21 # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- ``` Co-authored-by: Vojtech Novak <[email protected]> Co-authored-by: lukmccall <[email protected]> ```
Minimal reproducible example
https://github.com/rranjan14/expo-update-test
What platform(s) does this occur on?
Android
Where did you reproduce the issue?
in a development build
Summary
ksp version is too old for the kotlin version being used. Happening with expo-updates.
JVM version I am using is 17
Environment
Expo Doctor Diagnostics
The text was updated successfully, but these errors were encountered: