Я работаю с Flutter. Когда я запускаю свое приложение, все в порядке, но для Firebase мне нужно добавить отпечаток сертификата. Из myApp\android в терминале я пытаюсь ./gradlew.bat SigningReport получить отпечаток, но всегда получаю эту ошибку:
> Could not resolve com.google.gms:google-services:4.4.1.
Required by:
unspecified:unspecified:unspecified > com.google.gms.google-services:com.google.gms.google-services.gradle.plugin:4.4.1
> No matching variant of com.google.gms:google-services:4.4.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but:
- Variant 'apiElements' capability com.google.gms:google-services:4.4.1 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'javadocElements' capability com.google.gms:google-services:4.4.1 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'runtimeElements' capability com.google.gms:google-services:4.4.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'sourcesElements' capability com.google.gms:google-services:4.4.1 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.4.1" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "1.8.0" apply false
}
Я работаю с Flutter. Когда я запускаю свое приложение, все в порядке, но для Firebase мне нужно добавить отпечаток сертификата. Из myApp\android в терминале я пытаюсь ./gradlew.bat SigningReport получить отпечаток, но всегда получаю эту ошибку: [code]> Could not resolve com.google.gms:google-services:4.4.1. Required by: unspecified:unspecified:unspecified > com.google.gms.google-services:com.google.gms.google-services.gradle.plugin:4.4.1 > No matching variant of com.google.gms:google-services:4.4.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: - Variant 'apiElements' capability com.google.gms:google-services:4.4.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'javadocElements' capability com.google.gms:google-services:4.4.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'runtimeElements' capability com.google.gms:google-services:4.4.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'sourcesElements' capability com.google.gms:google-services:4.4.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
[/code] Это файл settings.gradle: [code]plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "7.3.0" apply false // START: FlutterFire Configuration id "com.google.gms.google-services" version "4.4.1" apply false // END: FlutterFire Configuration id "org.jetbrains.kotlin.android" version "1.8.0" apply false } [/code] Это мой gradle-wrapper.properties: [code]distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip [/code] Это моя версия Flutter: [img]https://i.sstatic.net /51oy02gH.png[/img]