android - Ionic + Cordova Android 构建错误 - 找不到 tools.jar

标签 android cordova ionic-framework ionic3 macos-big-sur

今天我将我的 MacBook 升级到 macOS Big Sur 版本 11.0.1。现在,当我尝试为 Android 构建项目时,出现了一个问题。

Execution failed for task ':CordovaLib:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

最佳答案

尝试运行

/usr/libexec/java_home -V
看看这是否显示在列表中
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
对我来说就是这种情况,我不得不删除 Internet Plug-Ins 文件夹中的条目。查看here有关对我有帮助的更多详细信息。

关于android - Ionic + Cordova Android 构建错误 - 找不到 tools.jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64856188/

相关文章:

android - fragment YouTubePlayerSupportFragment 中的重复 ID

android - MPAndroidChart:如何删除网格线?

javascript - 使用 Promise.then 时是否可以保留在单击事件调用堆栈中?

Android 定位 phonegap 版本

ios - Xcode 版本 10.3 ITMS-90035 : Invalid Signature

javascript - 在 Ionic 应用程序中发送电子邮件会导致以下错误 : TypeError: $cordovaEmailComposer. isAvailable is not a function

android - Kotlin - RecyclerView 项目中的 BottomNavigation- android.view.InflateException : Binary XML file line #91: Error inflating class

ios - PhoneGap/ Cordova : childBrowser plugin giving strange URL (iOS)

ios - 找不到模块 'simple-plist'

javascript - ionic 推送通知应用程序