i am working with react native
and am trying to use expo in a bare project but whenever i try to run the app with the command npm run android
, i get this error :
Execution failed for task ':expo-modules-core:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':expo-modules-core:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /home/dukizwe/Android/Sdk/platforms/android-31/core-for-system-modules.jar.
> jlink executable /usr/lib/jvm/java-14-openjdk-amd64/bin/jlink does not exist.
I am using the linux OS, Android studio and JDK are correctly installed.
Inside /usr/lib/jvm/
folder, the structure look like this:
- java-1.11.0-openjdk-amd64
- java-1.14.0-openjdk-amd64
- java-11-openjdk-amd64
- java-14-openjdk-amd64
- jdk-18
i don't know why it's looking in the java-14-openjdk-amd64
folder because in that folder there's no jlink
executable.
In android studio
the SDK Location
si pointed to java-11-openjdk
. Any help please ?
openjdk-14-jre
rather thanopenjdk-14-jdk
. Usefind
to see if can findjlink
in the/usr/jvm
tree. – Gingrichjava-14-openjdk-amd64
folder. You should try searching for this path and correcting it. – Barytesjava-11-openjdk-amd64
folder. Where exaclty can i change this path in android folder ? I searched everywhere but not find this – Aristasudo zypper in java-17-openjdk java-17-openjdk-headless java-17-openjdk-devel
(The one missing was -devel). Swap the version 17 with what you need – Theatrician