msm*_*fsd 1 java android reactjs react-native
我的 react native android 编译得很好,直到我按照文档添加了 react-native-firebase(ios 编译正常)。
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Library/Java/JavaVirtualMachines/Applications/AndroidStudio.app/Contents/jre/jd/Contents/Home错误:
> Task :react-native-firebase_app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-firebase_app:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
Run Code Online (Sandbox Code Playgroud)
小智 11
我正在使用 Mac Bigsur beta 4,我遇到了同样的问题。
我尝试按照此链接中的步骤卸载 java:
https://www.java.com/en/download/help/mac_uninstall_java.xml
从那以后,我检查了Java版本的终端使用:java -version。卸载过程不起作用。但是,react-native run-android现在运行有效。
尝试这个。它可能对你有用。
注意:如果您尝试卸载 java,但运行react-native run-android仍然无效,请将其添加到 bash_profile 并重试:export JAVA_HOME=/Applications/AndroidStudio.app/Contents/jre/jdk/Contents/Home
| 归档时间: |
|
| 查看次数: |
1784 次 |
| 最近记录: |