skip to Main Content

I am encountering a problem on my project build.

I am using the techno flutter.
I am using Android-Studio on Windows 11.

The error is:

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:AAPT: error: resource style/Theme.AppCompat.light.NoActionBar (aka com.example.nysos:style/Theme.AppCompat.light.NoActionBar) not found.
     error: failed linking references.

I have already cleared my gradle cache, used flutter clean, File > Invalidate caches > Clear file system chache and Local History > Invalidate and restart.

Could you please help me fixing this error ?

2

Answers


  1. Chosen as BEST ANSWER

    In Android Studio:

    1. CTRL+SHIFT+F
    2. Enter in the search bar: AppCompat
    3. Change Theme.AppCompat.light.NoActionBar to Theme.AppCompat.Light.NoActionBar
    4. Verify your versions in your flutter/android/app/build.gradle and flutter/android/build.gradle and it should work.

  2. i face this issue don’t know why but error clearly says about its location so i change styles.xml file code.

    1. in flutter project go to you android>app>src>main>values>styles.xml

    2. in styles.xml file change the line no 4

    3. <style name="LaunchTheme"parent="Theme.AppCompat.Light.NoActionBar">

    4. to

    5. <style name="LaunchTheme"parent="@android:style/Theme.Light.NoTitleBar">

    6. and line no 15

    7. <style name="NormalTheme"parent="Theme.MaterialComponents">

    8. to

    9. <style name="NormalTheme"parent="@android:style/Theme.Light.NoTitleBar">

    change these lines

    to this

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search