- Что пошло не так:
Не удалось выполнить задачу ':app:processDebugResources'.
Ошибка связывания ресурсов Android
com.coherent.EarHealth.app-mergeDebugResources-47:/values-v35/values-v35.xml:4: ошибка: атрибут стиля «android:attr/windowOptOutEdgeToEdgeEnforcement» не найден.ошибка: не удалось связать ссылки.
Я столкнулся с этой ошибкой атрибута стиля в моем проекте Flutter.
style.xml
@drawable/launch_background
?android:colorBackground
style.xml (значения-ночь)
@drawable/launch_background
?android:colorBackground
app/build.gradle
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0.22'
}
android {
namespace "com.coherents.Project"
compileSdkVersion 34
ndkVersion "27.0.12077973"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/bu ... on-id.html).
applicationId "com.coherents.Project"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/and ... figuration.
minSdkVersion 24
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
resValue "string", "app_name", "Project"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']}}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source '../..'
}
android/build.gradle
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
}
}
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... t-not-foun