0

Upgrading my project to Gluon Charm 4.3.0 involved updating the dependencies in build.gradle. According to the docs I need to upgrade all 4 charm dependencies; the base and the three platform related ones. http://docs.gluonhq.com/charm/4.3.0/#_adding_gluon_mobile_to_an_existing_project

When I try to compile I get an "could not resolve all dependencies", and indeed, if I take a peek in the Nexus repo mentioned in the documentation I do see a 4.3.0 for the base, but all the platform based artifact only go as high as 3... http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/ http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-android/

Has the repo moved or something?

4

1 回答 1

1

你是对的一件事:Charm 4+ 平台依赖不存在。

问题是您链接的文档中的一个错误,因为第 2.5.8 节不再有效:如果您继续阅读到第 8 章(迁移指南),您将看到:

Gluon Mobile 4 只需要一个依赖声明,而不是之前需要的四个声明。这将包括对 Charm Glisten 和 Gluon Connect 的依赖。

所以你现在只需要这个单一的 Charm 依赖:

dependencies {
    compile 'com.gluonhq:charm:4.3.0'
}

和这个:

jfxmobile {
    downConfig {
        version '3.2.0'
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android { ... }
}

至于所需的 Charm Down 插件。

还可以查看 Charm Down 中的代码更改

如果您使用 Gluon IDE 插件创建一个新项目,您将看到新build.gradle文件的外观。

于 2017-01-07T10:39:32.470 回答