gradle.daemon react-native:无法找到或加载主类“Dorg.gradle.daemon = true”

时间:2016-06-29 08:52:22

标签: gradle build.gradle react-native-android

当我尝试使用命令'react-native run-android'构建项目时,会出现以下错误: 错误:无法找到或加载主类“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 包含以下全局变量:

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”

我的模拟器正在运行,我运行了命令“source~ / .bash_profile”。

我想要的只是启用gradle守护程序并执行项目

1 个答案:

答案 0 :(得分:2)

不知道这是否是原因,但应该是:

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

请注意短划线-