skip to Main Content

I’m getting the following error when I try to build my apk:

Execution failed for task ':assets_audio_player_web:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:C:Userslubya.gradlecachestransforms-3ba0a6fe31cd4794ca72feaf033c059c8transformedcore-1.13.1resvaluesvalues.xml:113:5-122:25: AAPT: error: resource android:attr/lStar not found.

I got a bunch of other errors which I managed to fix. I also changed my ext.kotlin_version in my build.gradle from 1.6.10 to 1.7.0 in case that is of any relevance.

Relevant lines in pubsec.yaml:

dependencies:
  flutter:
    sdk: flutter
  assets_audio_player: ^3.0.8

I tried to fix the other errors but this one never left.
I expected to build the apk.

2

Answers


  1. In pubspec.yaml try adding the version as any

    assets_audio_player: any
    

    Then do flutter clean and try building it

    Login or Signup to reply.
  2. This error exists in 3.24+ versions of flutter. Based on reports, there are 2 possible ways to resolve it:

    1. Downgrade Flutter to 3.22. Will work because relevant Flutter framework patches didn’t make it to 3.22, only to 3.24 and up. But, there is no reasons to believe that it will be fixed in newer versions, because fix should be done on plugin side, not Flutter.
    2. Based on this answer, this addition to build.gradle should work. Make sure, that you create separate subprojects block and do not add to existing one:
    subprojects {
        afterEvaluate { project ->
            if (project.plugins.hasPlugin("com.android.application") ||
                    project.plugins.hasPlugin("com.android.library")) {
                project.android {
                    compileSdkVersion 34
                }
            }
        }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search