gpt4 book ai didi

android - 将 Ionic 应用程序部署到 Android 手机 (Ionic 4) 时出错

转载 作者:行者123 更新时间:2023-11-29 23:08:55 25 4
gpt4 key购买 nike

我正在运行命令 ionic cordova run android 并按预期连接了 usb 电缆。应用程序构建,然后当它开始构建 apk 以部署到我的手机上时,我在终端中遇到了这个错误。

> cordova run android Android Studio project detected ANDROID_HOME=/Users/user/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. 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_3e7pv4o3p5wholih0470cvjae.run(/Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/app/build.gradle:148) Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl FAILED

FAILURE: Build failed with an exception.

* What went wrong: null value in entry: incrementalFolder=null

* 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 4s 1 actionable task: 1 executed /Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

* What went wrong: null value in entry: incrementalFolder=null

* 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 4s [ERROR] An error occurred while running subprocess cordova.

cordova run android exited with exit code 1.

我查找了错误:incrementalFolder=null,我发现人们说要修复此错误,您需要删除现有 android studio 项目根目录中的 .gradle 文件夹。我试过了,没有任何变化。

有人知道解决这个问题的方法吗?我一无所知,任何帮助将不胜感激。

最佳答案

  1. 子项目路径:CordovaLib 子项目路径:app publishNonDefault 已弃用,不再有效。现在已发布所有变体。------------> 无影响。

  2. Task.leftShift(Closure) 方法已被弃用,并计划在 Gradle 5.0 中删除。请改用 Task.doLast(Action)。------------>无影响。

  3. 在 build_3e7pv4o3p5wholih0470cvjae.run (/Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/app/build.gradle:148) 项目“:app”中的配置“编译”已弃用。请改用“实现”。 ---------->修改 app/build.gradle 中的依赖项以使用“implemntation”而不是“compile”。

  4. :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl FAILED.------------>查看您的 aidl 相关更改;比如aidl接口(interface)的定义和位置。

从 android studio 终端运行命令 'gradlew assembleDebug --debug' 并查看它是否提供有关构建失败的更多详细信息。

enter image description here

enter image description here

[2]: /image/jJQRg.png

关于android - 将 Ionic 应用程序部署到 Android 手机 (Ionic 4) 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56223386/

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