【问题标题】:Ionic background geolocation service plugin installation errorIonic后台地理定位服务插件安装错误
【发布时间】:2018-07-30 11:37:10
【问题描述】:

我想将此插件添加到我的 ionic 应用程序中:https://www.transistorsoft.com/shop/products/cordova-background-geolocation

我已经通过 npm 安装了这个插件,删除/读取了 android 平台。 现在,当我想构建/运行应用程序时,构建失败并出现错误。

:app:transformClassesWithDesugarForDebug FAILED
40 actionable tasks: 40 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException:
Error while executing java process with main class com.google.devtools.build.android.desugar.

构建日志可在此处获得:https://pastebin.com/ZrRh7i7m

你有什么建议?提前谢谢!

【问题讨论】:

    标签: android angular cordova ionic-framework geolocation


    【解决方案1】:

    请检查 google play 服务版本是否与支持的 Cordova 版本有冲突。 https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/694

    【讨论】:

    • 我了解版本存在问题。它们是冲突的,但我不明白到底是什么冲突、为什么以及如何解决。在我的 config.xml 中,插件是这样添加的: 但在自动生成的platforms/android/project.properties文件中:target =android-26,所以android版本不匹配
    • 我曾尝试增加 project.properties 中的数字,或减少 config.xml 中的数字,但两种方式都失败了。
    猜你喜欢
    • 2017-09-23
    • 2023-03-04
    • 2019-06-19
    • 2018-09-19
    • 2020-02-08
    • 2018-02-26
    • 2018-08-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多