0

I have an aar file which has to be imported into Flutter project. But when I imported into project, it requires lots of style files which I don't have any clue what to do at this point.

Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:1593: AAPT: error: style attribute 'attr/itemBackground (aka com.example.project:attr/itemBackground)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:1594: AAPT: error: style attribute 'attr/itemIconTint (aka com.example.project:attr/itemIconTint)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:1595: AAPT: error: style attribute 'attr/itemTextColor (aka com.example.project:attr/itemTextColor)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:2030: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.example.project:attr/colorPrimaryVariant)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:2031: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.example.project:attr/colorOnPrimary)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:2033: AAPT: error: style attribute 'attr/colorSecondary (aka com.example.project:attr/colorSecondary)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:2034: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.example.project:attr/colorSecondaryVariant)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml:2035: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.example.project:attr/colorOnSecondary)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values-night-v8/values-night-v8.xml:40: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.example.project:attr/colorPrimaryVariant)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values-night-v8/values-night-v8.xml:41: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.example.project:attr/colorOnPrimary)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values-night-v8/values-night-v8.xml:43: AAPT: error: style attribute 'attr/colorSecondary (aka com.example.project:attr/colorSecondary)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values-night-v8/values-night-v8.xml:44: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.example.project:attr/colorSecondaryVariant)' not found.

     ERROR:/Users/user/Projects/Project/build/app/intermediates/incremental/debug/mergeDebugResources/merged.dir/values-night-v8/values-night-v8.xml:45: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.example.project:attr/colorOnSecondary)' not found.

I have implemented some styles but still I'm unable to run the project.

Here is some implementations in values/styles.xml and values-night-v8/style.xml

   <style name="NormalTheme" parent="@android:style/Theme.Light.NoActionBar">
        <item name="android:windowBackground">?android:colorBackground</item>
        <item type = "attr" name="colorPrimary">#FFFFFFFF</item>
        <item type = "attr" name= "itemIconTint">#FFFFFFFF</item>
        <item type = "attr" name= "itemTextColor">#FFFFFFFF</item>
        <item type = "attr" name= "itemBackground">#FFFFFFFF</item> 
    </style>

How can I solve the problem?

1 Answer 1

0

It is most likely Due to old material lib version, update all UI library and compatibility support to 17

Sign up to request clarification or add additional context in comments.

3 Comments

What is 17? Version number of material library?
it's basically java version, compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' }
Mine is 1_8 and 1.8. I will update it right now and update the question if that worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.