【问题标题】:NativeScript:more than one library with package name 'com.google.android.gms.license'NativeScript:多个库,包名称为“com.google.android.gms.license”
【发布时间】:2018-09-04 03:33:58
【问题描述】:

我尝试使用 nativescript 在 android 中构建项目。它抛出 像这样的错误不止一个带有包名的库 'com.google.android.gms.license'.

package.json

  "tns-android": {
  "version": "3.3.1"
}

   "nativescript-onesignal": "^1.0.7",   
"nativescript-push-notifications": "0.0.19",

App.gradle

   dependencies {
    compile 'com.onesignal:OneSignal:3.+@aar'   
    compile 'com.google.android.gms:play-services-gcm:+'    
   compile 'com.google.android.gms:play-services-location:+'     
   compile "com.android.support:multidex:1.0.0"
    compile 'com.android.volley:volley:1.0.0' 
    compile 'com.google.code.gson:gson:2.2.4' }

如何解决问题?

【问题讨论】:

  • "tns-android": { "version": "3.3.1" }
  • 你可以查看我的回答here我也遇到过同样的问题。
  • 我尝试像 tns 平台添加 android@3.4 那样更新 android 版本。但是我在像 cp 这样的更新过程中遇到错误:没有这样的文件或目录:cd/Project/node_modules/tns-android/framework/库
  • 分叉部分。

标签: nativescript nativescript-cli


【解决方案1】:

从项目和平台中删除 node_modules 和 hooks 文件夹。 重新安装它们“npm install”,然后尝试“tns platform remove android” "tns平台添加android@3.4"

【讨论】:

    【解决方案2】:

    删除 node_modules 文件夹。

    1.npm install tns-core-modules@latest --save 2.uinstall & update tns 版本/(npm install -g nativescript ) 3.更新节点/npm 4.npm缓存清理-f

    通过使用这个 cmets 我解决了问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多