【问题标题】:include.gradle file being generated is causing problems正在生成的 include.gradle 文件导致问题
【发布时间】:2017-05-19 21:24:06
【问题描述】:

在构建项目时出现以下错误:

风味“nativescript-telerik-ui”具有未知维度“nativescript-telerik-ui”。

只有在通过@progress 注册表使用专业版时才会发生这种情况。本地 .tgz 专业版不会发生这种情况。

我注意到错误与它生成的 include.gradle 文件有关。我阅读了以下文章:https://docs.nativescript.org/plugins/plugins#includegradle-specification

它说当插件没有 include.gradle 时,在构建时 gradle 会创建一个带有默认元素的默认插件。当我看到它为插件生成的 include.gradle 时,它​​似乎生成了一个像这样的默认值:

android {
    productFlavors {
        "nativescript-telerik-ui" {
            dimension "nativescript-telerik-ui"
        }
    }
}

为本地.tgz版本的插件生成的include.gradle是这样的:

android {
    productFlavors {
        "F6" {
            dimension "nativescripttelerikuipro"
        }
    }
}

我用后者替换了默认的 include.gradle,它克服了错误。您可以按照以下步骤重现问题:

  1. 创建一个新的 hello world 应用
  2. 如果您是付费客户,请使用命令npm login --registry=https://registry.npm.telerik.com/ --scope=@progress 登录。
  3. 使用命令npm install --save @progress/nativescript-telerik-ui-pro安装插件
  4. 使用tns run android

有什么办法可以解决这个问题吗?真的需要这方面的帮助。

【问题讨论】:

    标签: android telerik nativescript angular2-nativescript nativescript-telerik-ui


    【解决方案1】:

    我叫 Vladimir,是 nativescript-telerik-ui-pro 团队的一员。感谢您在我们的反馈门户中记录this issue。我们将尽快对其进行审查并向您更新其状态,但从我目前看到的情况来看,有一些不正确的“参数”传递给了插件的“专业”版本,这些将很快得到解决。

    对于由此造成的任何不便,我们深表歉意。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-20
      • 2018-09-23
      • 1970-01-01
      • 2012-08-24
      相关资源
      最近更新 更多