MACBOOK(OSX)最升到11.0.1后android 打包报错 Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.


参考:https://stackoverflow.com/questions/64856188/ionic-cordova-android-build-error-could-not-find-tools-jar

解决方法一:

在~/.zshrc (或 ~/.bashrc )文件中加入一句

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
注:根据自己的实际JDK路径修改上面的JDK路径。
查看JDK位置的命令 /usr/libexec/java_home -V(升级OSX11.0.1后,执行这个命令可能看到两个路径,一个是JDK的实际路径,另一个是:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home,(网上有资料说这个是JRE的路径)。

解决方法二:

下载最新版的JDK并安装:

https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

解决方法三:手动复制 tools.jar到

sudo cp /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/lib/tools.jar /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib

注:根据自己的实际JDK路径修改上面的JDK路径

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Mac中Ionic+Cordova Android打包报错Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation. MacOS安装Eclipse后启动报错:The JVM shared library "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/../lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol. eclipse failed to create jvm The JVM shared library "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/../lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol. 安装iamp模块,编译报错configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation. 解决ubuntu的Idea启动No JDK found. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation. jmeter--错误之Not able to find Java executable or version. Please check your Java installation. errorlevel=2 运行Jmeter.bat出错:Not able to find java executor or version. Please check your installation. errorlevel=2 【已解决】mac上appium报错:“Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path” Ubuntu安装pycharm, No JDK found. Please validate either PYCHARM_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation jmeter安装启动报错:Not able to find Java executable or version. Please check your Java installation
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM