首页 > 解决方案 > 最近更新后出现 Nativescript 插件问题

问题描述

我正在开发一个 Nativescript 项目,该项目现在已经毫无问题地合并了“nativescript-google-maps-sdk”和“nativescript-geolocation”插件。

但是最近,我开始在构建时遇到错误,并且反复试验消除已将其范围缩小到包含这些插件中的任何一个。具体来说,我得到了错误:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
        is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).

在寻找这个时,似乎这是某个地方的 Android 库版本冲突,我被引导到关于“迁移到 androidX”的讨论,但是这些线程中建议的缓解措施都没有产生任何积极的结果。

有没有其他人有这个问题,或者更重要的是:有没有人有解决方案的建议?

(顺便说一句:它继续在 iOS 上构建良好)

我已经确认我已完全更新到 {N} 5.4.3 并且也更新了我的平台。

我已经删除并添加了两个插件以确保最新版本。

这是我的 package.json 文件中的依赖项:

  "dependencies": {
    "base-64": "^0.1.0",
    "geodesy": "^1.1.3",
    "moment": "^2.24.0",
    "nativescript": "^5.4.0",
    "nativescript-camera": "^4.1.1",
    "nativescript-geolocation": "^4.4.2",
    "nativescript-google-maps-sdk": "^2.7.0",
    "nativescript-imagepicker": "^6.0.6",
    "nativescript-intl": "^3.0.0",
    "nativescript-multi-select": "^1.0.6",
    "nativescript-sqlite": "^2.3.3",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-dataform": "^3.10.0",
    "nativescript-ui-listview": "^5.2.0",
    "nativescript-ui-sidedrawer": "^5.1.0",
    "nativescript-unit-test-runner": "^0.3.4",
    "nativescript-websockets": "^1.5.3",
    "sourcemap-codec": "^1.4.4",
    "tns-core-modules": "^5.4.3",
    "tns-platform-declarations": "^5.3.1"
  },

标签: androidgoogle-mapsgeolocationnativescriptgoogle-geolocation

解决方案


推荐阅读