Larney
Larney

Reputation: 1684

gradle.daemon react-native: Could not find or load main class “Dorg.gradle.daemon=true”

When I try to build the project with the command 'react-native run-android' the following error appears: Error: Could not find or load main class “Dorg.gradle.daemon=true”

JS server already running.  
Building and installing the app on the device (cd android && ./gradlew installDebug...
Error: Could not find or load main class “Dorg.gradle.daemon=true”
Could not install the app on the device, read the error above for details.

.bash_profile contains the following global variables:

export ANDROID_HOME=$HOME/Library/Android/Android-SDK
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Hom 
export GRADLE_OPTS=“Dorg.gradle.daemon=true”

I have my emulator running and I have ran the command "source ~/.bash_profile".

All I want is to enable gradle daemon and execute the project.

Upvotes: 1

Views: 1814

Answers (1)

Opal
Opal

Reputation: 84786

Don't know if this is the reason but should be rather:

GRADLE_OPTS="-Dorg.gradle.daemon=true" 

mind the dash -.

Upvotes: 2

Related Questions