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

error: resource android:attr/lStar not found #356

Open
kururu-abdo opened this issue Aug 20, 2024 · 14 comments
Open

error: resource android:attr/lStar not found #356

kururu-abdo opened this issue Aug 20, 2024 · 14 comments

Comments

@kururu-abdo
Copy link

anyone experience this error on Flutter 3.19?

@Murkrow02
Copy link

I'm having this issue too when building an android APK

@stan-at-work
Copy link

stan-at-work commented Aug 22, 2024

Me to:

image
image

@usmanmsd007
Copy link

usmanmsd007 commented Aug 25, 2024

I was trying flutter build apk and was facing the same issue. Than I tried to update the kotin version insdie settings.gradle to 2.0.20. After that I made the following changes to:
~/.pub-cache/hosted/pub.dev/flutter_barcode_scanner-2.0.0/android/build.gradle


android {
    compileSdkVersion 34

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 34
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
}


the compilesdk and tragetsdk versions should follow the project versions.
Than flutter clean; flutter pub get; flutter build apk and it worked.

@i5hi
Copy link

i5hi commented Aug 27, 2024

Facing the same issue

@i5hi
Copy link

i5hi commented Aug 27, 2024

This helped me temporarily fix the issue (seems to be related to Flutter 3.24):

in android/build.gradle

subprojects {
    afterEvaluate { project ->
        if (project.plugins.hasPlugin("com.android.application") ||
                project.plugins.hasPlugin("com.android.library")) {
            project.android {
                compileSdkVersion 34
                buildToolsVersion "34.0.0"
            }
        }
    }
}

livekit/client-sdk-flutter#569 (comment)

@rohintonc
Copy link

rohintonc commented Aug 28, 2024

I found the same solution as others. changing the compileSdkVersion and targetSdkVersion from 30 to 31 in the package's build.gradle file fixed the issue:

android {
    compileSdkVersion 31

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 31
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
}

Error when building for release (debug didn't show the error for some reason):

Execution failed for task ':flutter_barcode_scanner:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:/Users/-/IDZ/flutter-app/zcloud/build/flutter_barcode_scanner/intermediates/merged_res/release/values/values.xml:6135: AAPT: error: resource android:attr/lStar not found.

This PR should fix this issue as it updates the compileSdkVersion and targetSdkVersion to 34: #348

@wrteam-anish
Copy link

wrteam-anish commented Aug 30, 2024

To temporary solve the issue you can use this following code:

Replace it in pubspec.yaml file

 flutter_barcode_scanner:
     git:
       url: https://github.com/wrteam-anish/flutter_barcode_scanner.git
       ref: master

Thank you!

@Ferrb9579
Copy link

+1

@bldr1862
Copy link

bldr1862 commented Sep 4, 2024

I'll give it a try, thanks!

@KlausJuhantalo
Copy link

KlausJuhantalo commented Sep 5, 2024

simple_barcode_scanner 0.1.1 depends on flutter_barcode_scanner ^2.0.0 and no versions of simple_barcode_scanner match >0.1.1 <0.2.0, simple_barcode_scanner ^0.1.1 requires flutter_barcode_scanner from hosted.
So, because app depends on both flutter_barcode_scanner from git and simple_barcode_scanner ^0.1.1, version solving failed.

@iamansuman
Copy link

iamansuman commented Sep 5, 2024

I tried building with
compileSdk = 34
minSdk = 33
targetSdk = 34

Flutter version: 3.24.2-stable
Kotlin version: 1.7
Gradle version: 7.6
JDK: 19.0.2

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_barcode_scanner:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:<path to project DIR>\build\flutter_barcode_scanner\intermediates\merged_res\release\values\values.xml:6135: AAPT: error: resource android:attr/lStar not found.

@wrteam-anish
Copy link

wrteam-anish commented Sep 6, 2024

I tried building with compileSdk = 34 minSdk = 33 targetSdk = 34

Flutter version: 3.24.2-stable Kotlin version: 1.7 Gradle version: 7.6 JDK: 19.0.2

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_barcode_scanner:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:<path to project DIR>\build\flutter_barcode_scanner\intermediates\merged_res\release\values\values.xml:6135: AAPT: error: resource android:attr/lStar not found.

set minSdk = 21 and try also delete .gradle folder and delete pubspec.lock

@BFSistemi
Copy link

This helped me temporarily fix the issue (seems to be related to Flutter 3.24):

in android/build.gradle

subprojects {
    afterEvaluate { project ->
        if (project.plugins.hasPlugin("com.android.application") ||
                project.plugins.hasPlugin("com.android.library")) {
            project.android {
                compileSdkVersion 34
                buildToolsVersion "34.0.0"
            }
        }
    }
}

livekit/client-sdk-flutter#569 (comment)

This solution worked for me

@ChiragLiveu
Copy link

I have a similar issue is there any way to resolve it? Can any buddy help with the below? I am facing an issue after upgrading to Flutter version 3.24.1

android {
compileSdkVersion 34

defaultConfig {
    minSdkVersion 24
    targetSdkVersion 34
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
    disable 'InvalidPackage'
}

}
Error when building for release (debug didn't show the error for some reason):

Execution failed for task ':flutter_barcode_scanner:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:/Users/-/IDZ/flutter-app/zcloud/build/flutter_barcode_scanner/intermediates/merged_res/release/values/values.xml:6135: AAPT: error: resource android:attr/lStar not found.

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