Использование apollo-android в Gluon mobile - PullRequest
0 голосов
/ 18 сентября 2018

Я пытаюсь включить клиент apollo-android graphql в мобильный проект gluon.

Вот как выглядит мой build.gradle

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.12'
        classpath 'com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha2'
    }
}

apply plugin: 'org.javafxports.jfxmobile'
apply plugin: 'com.apollographql.android'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

mainClassName = 'com.mighty.GraphQL'

dependencies {
    compile 'com.gluonhq:charm:5.0.0'
    compile 'com.gluonhq:glisten-afterburner:1.4.0'
    compile 'com.apollographql.apollo:apollo-runtime:1.0.0-alpha2'
}

jfxmobile {
    downConfig {
        version = '3.8.0'
        // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.mighty.**.*',
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}

Если я удалю плагин apollo-androidи зависимость, проект строится успешно.Однако при существующем состоянии с плагином и зависимостью apollo android сборка завершается с ошибкой:

Unable to load class 'com.android.sdklib.repository.FullRevision'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)</li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)</li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Я перепробовал все предложения, но ничего не работает.Пожалуйста, любые решения или обходные пути будут оценены.Мне действительно нужно реализовать клиент graphql в мобильном проекте Gluon.

...