0

Olá, estou tentando executar meu aplicativo, no entanto, ele dá o seguinte erro:

    please apply google-services plugin at the bottom of the build file.
:compileJava
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not find com.gluonhq:charm:4.4.1.
  Searched in the following locations:
      https://jcenter.bintray.com/com/gluonhq/charm/4.4.1/charm-4.4.1.pom
      https://jcenter.bintray.com/com/gluonhq/charm/4.4.1/charm-4.4.1.jar
      https://maven.google.com/com/gluonhq/charm/4.4.1/charm-4.4.1.pom
      https://maven.google.com/com/gluonhq/charm/4.4.1/charm-4.4.1.jar
      file:/home/joaojunior/Android/Sdk/extras/android/m2repository/com/gluonhq/charm/4.4.1/charm-4.4.1.pom
      file:/home/joaojunior/Android/Sdk/extras/android/m2repository/com/gluonhq/charm/4.4.1/charm-4.4.1.jar
      file:/home/joaojunior/Android/Sdk/extras/google/m2repository/com/gluonhq/charm/4.4.1/charm-4.4.1.pom
      file:/home/joaojunior/Android/Sdk/extras/google/m2repository/com/gluonhq/charm/4.4.1/charm-4.4.1.jar
  Required by:
      :SingleViewProjectL:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED

Isso começou a acontecer depois que eu adicionei as dependências da base de fogo.

Alguém sabe o que posso fazer para poder executar?

Meu build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.10'
            classpath 'com.google.gms:google-services:3.1.1' // google-services plugin

    }
}

apply plugin: 'org.javafxports.jfxmobile'

apply plugin: 'com.google.gms.google-services'


repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
        url "https://maven.google.com" // Google's Maven repository

    }
}

mainClassName = 'com.gluonapplication.GluonApplication'

dependencies {
    compile 'com.gluonhq:charm:4.4.1'
    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-database:11.6.2'
    compile 'com.gluonhq:charm-down-core:3.5.0'

    androidRuntime 'com.gluonhq:charm-down-core-android:3.5.0'
    androidRuntime 'com.gluonhq:charm-down-plugins-storage-android:3.5.0'
    androidRuntime 'com.gluonhq:charm-down-plugins-lifecycle-android:3.5.0'

    iosRuntime 'com.gluonhq:charm-down-core-ios:3.5.0'
    iosRuntime 'com.gluonhq:charm-down-plugins-storage-ios:3.5.0'
    iosRuntime 'com.gluonhq:charm-down-plugins-lifecycle-ios:3.5.0'

    desktopRuntime 'com.gluonhq:charm-down-plugins-storage-desktop:3.5.0'
    desktopRuntime 'com.gluonhq:charm-down-plugins-lifecycle-desktop:3.5.0'
}

jfxmobile {
    downConfig {
        version = '3.6.0'
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android {
        manifest = 'src/android/AndroidManifest.xml'
        androidSdk = '/home/joaojunior/Android/Sdk'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}

1 Resposta 1

0

O erro está claro:

please apply google-services plugin at the bottom of the build file.

Significa que você tem de colocar essa dependência no fim do ficheiro:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.10'
            classpath 'com.google.gms:google-services:3.1.1' // google-services plugin

    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
        url "https://maven.google.com" // Google's Maven repository

    }
}

mainClassName = 'com.gluonapplication.GluonApplication'

dependencies {
    compile 'com.gluonhq:charm:4.4.1'
    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-database:11.6.2'
    compile 'com.gluonhq:charm-down-core:3.5.0'

    androidRuntime 'com.gluonhq:charm-down-core-android:3.5.0'
    androidRuntime 'com.gluonhq:charm-down-plugins-storage-android:3.5.0'
    androidRuntime 'com.gluonhq:charm-down-plugins-lifecycle-android:3.5.0'

    iosRuntime 'com.gluonhq:charm-down-core-ios:3.5.0'
    iosRuntime 'com.gluonhq:charm-down-plugins-storage-ios:3.5.0'
    iosRuntime 'com.gluonhq:charm-down-plugins-lifecycle-ios:3.5.0'

    desktopRuntime 'com.gluonhq:charm-down-plugins-storage-desktop:3.5.0'
    desktopRuntime 'com.gluonhq:charm-down-plugins-lifecycle-desktop:3.5.0'
}

jfxmobile {
    downConfig {
        version = '3.6.0'
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android {
        manifest = 'src/android/AndroidManifest.xml'
        androidSdk = '/home/joaojunior/Android/Sdk'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}
apply plugin: 'com.google.gms.google-services'

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .