更新cordova-plugin-x-socialsharing插件后出现安卓Android编译错误

问题描述 投票:1回答:1

我有一个Ionic 3应用程序,我刚刚在其中更新了cordova-plugin-x-socialsharing插件。

离子信息..

    $ ionic info

    Ionic:

       ionic (Ionic CLI)  : 4.5.0 (C:\Users\peter\AppData\Roaming\npm\node_modules\ionic)
       Ionic Framework    : ionic-angular 3.6.1
       @ionic/app-scripts : 3.2.2

    Cordova:

       cordova (Cordova CLI) : 7.0.1
       Cordova Platforms     : android 6.2.3, ios 4.3.1, windows 5.0.0
       Cordova Plugins       : no whitelisted plugins (16 plugins total)

    System:

       Android SDK Tools : 26.1.1 (C:\Users\peter\AppData\Local\Android\sdk)
       NodeJS            : v10.15.0 (C:\Program Files\nodejs\node.exe)
       npm               : 6.4.1
       OS                : Windows 10

我现在收到以下构建错误。。

    * Where:
    Build file 'D:\dev\myapp\platforms\android\build.gradle' line: 252

    * What went wrong:
    A problem occurred evaluating root project 'android'.
    > Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

在build.grade的一行中,我有以下内容。

enter image description here

而且,在我的package.json中,我注意到我现在有以下内容。

"cordova-plugin-x-socialsharing": {
            "ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
        },

我已经计划好移植到Ionic 4,在这里我可能会重新添加所有平台,但是在那之前,没有人知道如何解决此问题?

提前感谢

我有一个Ionic 3应用程序,在这里我刚刚更新了cordova-plugin-x-socialsharing插件。离子信息.. $离子信息离子:离子(离子CLI):4.5.0(C:\ Users \ peter \ AppData \ ...

cordova ionic-framework cordova-plugins
1个回答
0
投票

建议here降级到5.4.0版本。撰写本文时,该插件的当前版本为5.6.3。因此,对我而言,这并不是真正的解决方案,而是一个临时解决方法。但是我尝试了一下,它似乎起作用了。

© www.soinside.com 2019 - 2024. All rights reserved.