问题
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?
回答1:
You are right about one thing: the Charm 4+ platform dependencies are not there.
The problem is a bug in the document you linked, as the section 2.5.8 is no longer valid: if you keep on reading until chapter 8 (migration guide) you'll see this:
Gluon Mobile 4 requires only one dependency declaration instead of the four declarations that were needed previously. That will include the dependencies to Charm Glisten and Gluon Connect.
So all you need now is this single Charm dependency:
dependencies {
compile 'com.gluonhq:charm:4.3.0'
}
and this:
jfxmobile {
downConfig {
version '3.2.0'
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android { ... }
}
as for the required Charm Down plugins.
Also have a look at the code changes in Charm Down.
If you create a new project with the Gluon IDE plugin you'll see how the new build.gradle
file will look like.
来源:https://stackoverflow.com/questions/41519348/gluon-4-x-x-artifacts-not-in-the-nexus-repo