skip to Main Content

I’m triying to build my flutter apk using flutter build apk, But it says

`
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:uni_links2:verifyReleaseResources’.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:C:UsersDELLbitsnbytesHomeIQ – Appsmarthomebuilduni_links2intermediatesmerged_resreleasevaluesvalues.xml:194: AAPT: error: resource android:attr/lStar not found.

  • Try:

Run with –stacktrace option to get the stack trace.
Run with –info or –debug option to get more log output.
Run with –scan to get full insights.

BUILD FAILED in 11s
Running Gradle task ‘assembleRelease’… 12.8s
Gradle task assembleRelease failed with exit code 1
`

How do i resolve this ???

i want to download my release-apk.

2

Answers


  1. Update Gradle and Plugin Versions

    Make sure your build.gradle files are using compatible versions. Open your project-level build.gradle file and check the following:

        buildscript {
        ext.kotlin_version = '1.5.31' // or latest stable version
        repositories {
            google()
            mavenCentral()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:7.0.4' // or latest stable version
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        }
    }
    
    Login or Signup to reply.
  2. compileSdkVersion and targetSdkVersion are set to a version that supports the lStar attribute. You can set them to 33 or higher. Update your build.gradle file
    :

    android {
        compileSdkVersion 33
        defaultConfig {
            targetSdkVersion 33
        }
    }
    

    then clean and build apk:

    flutter clean
    flutter pub get
    flutter build apk --release
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search