Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ERROR: C:\...\background_fetch\intermediates\merged_res\release\mergeReleaseResources\values\values.xml:195: AAPT: error: resource android:attr/lStar not found. #381

Open
halhwadi opened this issue Oct 20, 2024 · 0 comments

Comments

@halhwadi
Copy link

halhwadi commented Oct 20, 2024

Windows 11

  • Plugin version: 1.3.7
  • Platform: iOS or Android

*** Flutter info (flutter info, flutter doctor):**
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4317], locale en-AE)
• Flutter version 3.24.3 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (6 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\Husam\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.4.33213.308
• Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2024.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)

[√] Connected device (4 available)
• SM A125F (mobile) • adb-R58R1008B2E-oQ4aOb._adb-tls-connect._tcp • android-arm64 • Android 12 (API 31)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4317]
• Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.101
• Edge (web) • edge • web-javascript • Microsoft Edge 130.0.2849.46

[√] Network resources
• All expected network resources are available.

  • Plugin config

To Reproduce
Steps to reproduce the behavior:

  1. run "Flutter build apk command
  2. getting error msg says:
  3. [BUG] ERROR: C:\Users\Husam\Bikum\build\background_fetch\intermediates\merged_res\release\mergeReleaseResources\values\values.xml:195: AAPT: error: resource android:attr/lStar not found.

Android/App/Gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


android {
    namespace 'org.bikum'
//    compileSdkVersion flutter.compileSdkVersion
    compileSdkVersion 34

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17

        coreLibraryDesugaringEnabled true
    }

    kotlinOptions {
        jvmTarget = '17'
    }

    java {
        toolchain {
            languageVersion.set(JavaLanguageVersion.of(17))  // Use Java 17
        }
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "org.bikum"
//        minSdkVersion flutter.minSdkVersion
        minSdkVersion 26
//        targetSdkVersion flutter.targetSdkVersion
        targetSdkVersion 33
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true


        buildTypes {
            release {
                minifyEnabled true
                shrinkResources true
//            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }

            debug {
                shrinkResources false
                minifyEnabled false
            }
        }

        flutter {
            source '../..'
        }

        dependencies {
            implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
            coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
//        implementation 'com.android.tools:desugar_jdk_libs:2.0.3'
//        coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.9'
//        implementation 'com.android.tools:desugar_jdk_libs-2.1.2'
//        coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'
//        implementation 'androidx.multidex:multidex:2.0.1'
        }
    }

}


**Additional context**
Add any other context about the problem here.

Android/Gradle:

buildscript {
//    ext.kotlin_version = 1.6.10
    ext.kotlin_version = '1.8.0'

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
//        classpath 'com.android.tools.build:gradle:4.1.3'
//        classpath 'com.android.tools.build:gradle:7.0.4'
        classpath 'com.android.tools.build:gradle:8.7.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        // [required] background_fetch
        maven { url "${project(':background_fetch').projectDir}/libs" }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

@halhwadi halhwadi changed the title [BUG] ERROR: C:\Users\Husam\Bikum\build\background_fetch\intermediates\merged_res\release\mergeReleaseResources\values\values.xml:195: AAPT: error: resource android:attr/lStar not found. [BUG] ERROR: C:\........\background_fetch\intermediates\merged_res\release\mergeReleaseResources\values\values.xml:195: AAPT: error: resource android:attr/lStar not found. Oct 20, 2024
@halhwadi halhwadi changed the title [BUG] ERROR: C:\........\background_fetch\intermediates\merged_res\release\mergeReleaseResources\values\values.xml:195: AAPT: error: resource android:attr/lStar not found. [BUG] ERROR: C:\...\background_fetch\intermediates\merged_res\release\mergeReleaseResources\values\values.xml:195: AAPT: error: resource android:attr/lStar not found. Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant