首页 > 解决方案 > 科尔多瓦构建android上的离子错误

问题描述

我正在尝试使用 ionic 构建一个 android 应用程序,但我有这些问题,真的不知道出了什么问题。

任务:app:compileDebugJavaWithJavac FAILED /Users/Imade/hellotag/platforms/android/app/src/main/java/com/google/cordova/plugin/BrowserTab.java:21:错误:找不到符号导入android.support.customtabs .CustomTabsIntent; ^ 符号:类 CustomTabsIntent 位置:包 android.support.customtabs /Users/Imade/hellotag/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:11:错误:包 android .support.annotation 不存在 import android.support.annotation.RequiresApi; ^ /Users/Imade/hellotag/platforms/android/app/src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java:137:错误:找不到符号@RequiresApi(Build.VERSION_CODES.LOLLIPOP) ^ 符号:类 RequiresApi 位置:类 IonicWebViewEngine。ServerClient /Users/Imade/hellotag/platforms/android/app/src/main/java/com/google/cordova/plugin/BrowserTab.java:104:错误:包 CustomTabsIntent 不存在 Intent customTabsIntent = new CustomTabsIntent.Builder() .build().intent; ^ 注意:某些输入文件使用或覆盖已弃用的 API。注意:使用 -Xlint:deprecation 重新编译以获取详细信息。4 个错误

FAILURE:构建失败并出现异常。

cordova 平台版本 android
安装平台:android 8.1.0 ios 6.2.0

离子-v
6.16.3

java版本

openjdk 版本 "1.8.0_272" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_272-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.272-b10, 混合模式)

标签: androidionic-frameworkcordova-android

解决方案


推荐阅读