Я пытаюсь добавить android.applicationVariants в build.gradle. но появляется ошибка: Не удалось разрешить все файлы для конфигурации ':app:debugCompileClasspath' - Несовпадающие атрибуты:
> The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'. However we cannot choose between the following variants of project :react-native-firebase_messaging:
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-classes-jar declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-classes-jar' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Provides its elements packaged as a jar but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-lint' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Provides its elements packaged as a jar but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-local-aar declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-lint-local-aar' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-model-metadata declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-lint-model-metadata' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-variant-dependencies-model declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-lint-variant-dependencies-model' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-variant-dependencies-partial-results declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-lint-variant-dependencies-partial-results' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-manifest declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-manifest' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-renderscript declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-renderscript' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant android-symbol-with-package-name declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'android-symbol-with-package-name' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Configuration ':react-native-firebase_messaging:debugApiElements' variant jar declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
- Unmatched attributes:
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Provides attribute 'artifactType' with value 'jar' but the consumer didn't ask for it
- Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it
- Provides its elements packaged as a jar but the consumer didn't ask for it
Я пытаюсь добавить android.applicationVariants в build.gradle. но появляется ошибка: Не удалось разрешить все файлы для конфигурации ':app:debugCompileClasspath' - Несовпадающие атрибуты: [code]def extractFinFile(zip, variant, destFileName) { copy { from zip.matching { include 'guardit.fin' } into "${buildDir}/outputs/fin/${variant.name}" rename { filename -> filename.replace 'guardit4j', "${destFileName}" } } }
def extractFinFiles() { android.applicationVariants.each { variant -> if (android.hasProperty("dynamicFeatures")) { def rootProjectName = project.rootProject.name android.dynamicFeatures.each { String featureProjectName -> def dynamicFeatureProject = project.rootProject.project(featureProjectName) if (!dynamicFeatureProject.hasProperty("android")) { // Android configuration is not accessible during project configuration return }
def files = variant.compileConfiguration.files files.each { file -> println file.name if (file.name.endsWith(".aar") ) { def aarZip = zipTree(file) extractFinFile(aarZip, variant, file.name.substring(0, file.name.lastIndexOf('.'))) aarZip.files.each { fileFromAar -> if (fileFromAar.name == "classes.jar") { def classesJarZip = zipTree(fileFromAar) extractFinFile(classesJarZip, variant, file.name.substring(0, file.name.lastIndexOf('.'))) } } } else if (file.name.endsWith(".jar")) { def jarZip = zipTree(file) extractFinFile(jarZip, variant, file.name.substring(0, file.name.lastIndexOf('.'))) } } } } [/code] Я получил ошибку при запуске команды ./gradlew clean Bundle [code] > The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'. However we cannot choose between the following variants of project :react-native-firebase_messaging: - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-classes-jar declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-classes-jar' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Provides its elements packaged as a jar but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-lint' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Provides its elements packaged as a jar but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-local-aar declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-lint-local-aar' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-model-metadata declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-lint-model-metadata' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-variant-dependencies-model declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-lint-variant-dependencies-model' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-lint-variant-dependencies-partial-results declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-lint-variant-dependencies-partial-results' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-manifest declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-manifest' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-renderscript declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-renderscript' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant android-symbol-with-package-name declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'android-symbol-with-package-name' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Configuration ':react-native-firebase_messaging:debugApiElements' variant jar declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'artifactType' with value 'jar' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it - Provides its elements packaged as a jar but the consumer didn't ask for it [/code] я использую Gradle 8.7 [code]distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip [/code] Java версии 17 [code]java 17.0.10 2024-01-16 LTS[/code] мне нужна помощь, чтобы решить эту проблему
FAILURE: сборка не удалась из-за исключения. * Что пошло не так: Не удалось выполнить задачу «:app:compileDebugKotlin». > Не удалось разрешить все файлы конфигурации «:app:debugCompileClasspath». > Не удалось преобразовать...
запускаем React-native run-android в Windows, но получаем эту ошибку:
(node:25824) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was...
**Я работал над собственным приложением React для Windows, используя собственный интерфейс реагирования, и все было хорошо, пока я не установил пакет React Navigation -> Stack Navigator, после этого я вообще не мог запустить приложение
Проблема,...