Malyaj Singh
Malyaj Singh

Reputation: 1

Having issue while building a preview in expo (React Native)

My app is running perfectly fine when using on emulator but throwing this error when trying to build it in expo

Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android Welcome to Gradle 8.3! Here are the highlights of this release:

Task :expo-dev-launcher-gradle-plugin:pluginDescriptors Task :expo-dev-launcher-gradle-plugin:processResources Task :gradle-plugin:pluginDescriptors Task :gradle-plugin:processResources Task :expo-dev-launcher-gradle-plugin:compileKotlin Task :expo-dev-launcher-gradle-plugin:compileJava NO-SOURCE Task :expo-dev-launcher-gradle-plugin:classes Task :expo-dev-launcher-gradle-plugin:jar Task :expo-dev-launcher-gradle-plugin:inspectClassesForKotlinIC Task :gradle-plugin:compileKotlin Task :gradle-plugin:compileJava NO-SOURCE Task :gradle-plugin:classes Task :gradle-plugin:jar Task :gradle-plugin:inspectClassesForKotlinIC Configure project :app ℹ️ Applying gradle plugin 'expo-dev-launcher-gradle-plugin' ([email protected]) Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable FAILURE: Build completed with 2 failures. 1: Task failed with an exception.


Could not set unknown property 'classifier' for task ':expo-structured-headers:androidSourcesJar' of type org.gradle.api.tasks.bundling.Jar.

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org ============================================================================== 2: Task failed with an exception.


Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org. ============================================================================== BUILD FAILED in 2m 23s 10 actionable tasks: 10 executed Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

I have tried removing few packages I installed since the last time I used build but still I havent found any solution to this problem.

Upvotes: 0

Views: 388

Answers (1)

Growcys
Growcys

Reputation: 1

Do you have Java installed on your machine?

Daemon will be stopped at the end of the build Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable

The error message indicates that the path for the Java installation does not contain a Java executable.

You should verify that Java is correctly installed and the env vars on your system.

Upvotes: 0

Related Questions