gpt4 book ai didi

android - 将 Crosswalk 插件添加到 Cordova Android 项目后生成错误

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:48:58 25 4
gpt4 key购买 nike

我正在使用最新的 cordova android (5.1.0)。该项目在没有人行横道的情况下正在构建和运行良好,但是在我使用

添加人行横道插件之后
cordova plugin add https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git

我收到以下构建错误:

Error:15:53:54.127 [ERROR] [system.err] /Users/or/Projects/Test/cordova/platforms/android/src/org/crosswalk/engine/    XWalkWebViewEngine.  java:48: error: cannot find symbol
15:53:54.127 [ERROR] [system.err] import org.xwalk.core.XWalkGetBitmapCallback;
15:53:54.128 [ERROR] [system.err] ^
15:53:54.128 [ERROR] [system.err] symbol: class XWalkGetBitmapCallback
15:53:54.128 [ERROR] [system.err] location: package org.xwalk.core
15:53:54.178 [ERROR] [system.err] /Users/or/Projects/Test/cordova/platforms/android/src/org/crosswalk/engine/XWalkWebViewEngine. java:103: error: cannot find symbol
15:53:54.179 [ERROR] [system.err] new XWalkGetBitmapCallback() {
15:53:54.179 [ERROR] [system.err] ^
15:53:54.180 [ERROR] [system.err] symbol: class XWalkGetBitmapCallback
15:53:54.181 [ERROR] [system.err] /Users/or/Projects/Test/cordova/platforms/android/src/org/crosswalk/engine/XWalkWebViewEngine. java:207: error: cannot find symbol
15:53:54.182 [ERROR] [system.err] webView.getExtensionManager().loadExtension(XWALK_EXTENSIONS_FOLDER + File.separator + path);
15:53:54.182 [ERROR] [system.err] ^
15:53:54.182 [ERROR] [system.err] symbol: method getExtensionManager()
15:53:54.182 [ERROR] [system.err] location: variable webView of type XWalkCordovaView
15:53:54.184 [ERROR] [system.err] /Users/or/Projects/Test/cordova/platforms/android/src/org/crosswalk/engine/XWalkCordovaView. java:93: error: method does not override or implement a method from a supertype
15:53:54.185 [ERROR] [system.err] @Override
15:53:54.185 [ERROR] [system.err] ^
15:53:54.188 [ERROR] [system.err] Note: Some input files use or override a deprecated API.
15:53:54.188 [ERROR] [system.err] Note: Recompile with -Xlint:deprecation for details.
15:53:54.188 [ERROR] [system.err] 4 errors
15:53:54.190 [ERROR] [org.gradle.BuildExceptionReporter]
15:53:54.190 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:53:54.191 [ERROR] [org.gradle.BuildExceptionReporter]
15:53:54.191 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:53:54.191 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':compileX86DebugJavaWithJavac'.
15:53:54.191 [ERROR] [org.gradle.BuildExceptionReporter] > Compilation failed; see the compiler error output for details.
15:53:54.191 [ERROR] [org.gradle.BuildExceptionReporter]
15:53:54.191 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
15:53:54.192 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.

该项目是使用 Android Studio 构建的。

有人遇到过类似的事情吗?

谢谢

最佳答案

如果使用 Ionic(不确定其他框架平台是否也这样做),根 config.xml 模板包括以下引用:

<preference name="xwalkVersion" value="17+" />

通过删除它并触发

cordova build android 

(并遵循@badboyunited 的回答)导致下载最新版本的插件。

关于android - 将 Crosswalk 插件添加到 Cordova Android 项目后生成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35063792/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com