Could not find tools.jar
2021-01-05 App开发
出现的问题 #
将MAC OS 升级至11.1,安卓打包时报出错误
是因为升级之后JAVA_HOME
未进行配置。编译时找到了jre的目录,而目录则不包含tool.jar
解决方法 #
- 使用/usr/libexec/java_home -V查看JDK目录
设置JAVA_HOME:
vim ~/.zshrc
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
vim ~/.zshrc
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
2.把tools.jar
复制到Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib
sudo cp /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/lib/tools.jar
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib
sudo cp /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/lib/tools.jar
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib
#
版权属于: vincent
转载时须注明出处及本声明
Tags: