我用模板会议创建了一个项目。 (在项目标签中它很好用)
当我尝试编译 apk 时出现此错误..
> cordova build android --release
ANDROID_HOME=/Users/davidgarcia/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
[12:19:59] lint finished in 2.10 s
:wrapper
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
Subproject Path: CordovaLib
null
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_3qbzzf6nitbz2giwqcx9aytt5.run(/Users/davidgarcia/Desktop/ionic/aplication/platforms/android/build.gradle:142)
org.xwalk:xwalk_core_library:22+
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
>
All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
* Try:
Run with
--stacktrace
option to get the stack trace. Run with --info
or --debug
option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
(node:3790) UnhandledPromiseRejectionWarning: Error: /Users/davidgarcia/Desktop/ionic/aplication/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
at ChildProcess.whenDone (/Users/davidgarcia/Desktop/ionic/aplication/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:3790) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3790) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我已经在 android 中安装了这个:
有什么解决办法吗?
这是一个相关的堆栈溢出问题: https :
一定是我们使用的人行横道插件有问题。 对于我们正在为 v4 开发的会议应用程序的新版本,crosswalk 已被删除,因为它是一个未维护的项目,对于绝大多数 Android 设备而言不再是必需的。
这是目前的解决方法,但这将在我们的 v4 版本中自动修复:
ionic cordova plugin rm cordova-plugin-crosswalk-webview
谢谢!! :)
别客气!
最有用的评论
这是一个相关的堆栈溢出问题: https :
一定是我们使用的人行横道插件有问题。 对于我们正在为 v4 开发的会议应用程序的新版本,crosswalk 已被删除,因为它是一个未维护的项目,对于绝大多数 Android 设备而言不再是必需的。
这是目前的解决方法,但这将在我们的 v4 版本中自动修复: