Closed spaceofnova closed 3 months ago
It happens when you run expo run:android
?
Did you do a expo prebuild --platform android
before running it ?
Sorry for the late reponse but this is the order of stuff I do:
I'll need some extra infos to be able to help you :
expo
?react-native
?@pchmn/expo-material3-theme
?android
folder ?@pchmn/expo-material3-theme
?And can you make a reproductible example with this problem because I cannot reproduce it ?
The only this I have changed in the android folder was gradle.properties: kotlin.jvm.target.validation.mode = IGNORE This was due to it not build because of incompatible JVM Target.
expo: ~51.0.8 react-native: 0.74.1 @pchmn/expo-material3-theme: ^1.3.2
I couldn't make a snack reproduce it due to the prebuild but I put together a repo where the issue happens: https://github.com/spaceofnova/material3buildbug
I have no problem running npx expo run:android
on your repo.
But looking more closely at the error, it appears you are using JDK v21 (class file v65.0) to compile the Android application while React Native recommends using JDK v17 (https://reactnative.dev/docs/next/set-up-your-environment?platform=android#installing-dependencies):
If you have already installed JDK on your system, we recommend JDK 17. You may encounter problems using higher JDK versions.
Can you confirm your JDK version (java --version
) ?
I recently had to update my main machine to Windows 11 ( a fresh install ), so I haven't got Java installed yet.
I was using the latest JDK 21 before, though.
Using JDK 17.0.11 seems to work, thank you!
No problem ! Closing the issue
I can't seem to get android to build on the latest version (I have not tested IOS)