5

yesterday, I upgraded flutter to the latest version(1.12.13+hotfix.5),i got the following errors when building the flutter apk

* What went wrong:                                                                                                 
Execution failed for task ':sharesdk_plugin:verifyReleaseResources'.                                               
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/binaryiv/Documents/projects/appProjects/huoli/app/build/sharesdk_plugin/intermediates/res/merged/release/values/values.xml:879: error: resource android:attr/fontVariationSettings not found.
  /Users/binaryiv/Documents/projects/appProjects/huoli/app/build/sharesdk_plugin/intermediates/res/merged/release/values/values.xml:880: error: resource android:attr/ttcIndex not found.
  error: failed linking references. 

my compileSdkVersion and targetSdkVersion is 28,i can build it by deleting the sharesdk_plugin plugin. Is there any other way to configure and keep the plugin by building

3 Answers 3

4

I found in the error: resource android:attr/fontVariationSettings not found last answer can solved my problems with sharesdk_plugin Add the code:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 28
                buildToolsVersion '29.0.2'
            }
        }
    }
}

in android/build.gradle in the last. Good luck for you.

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

1 Comment

i was able to fix such an issue by just doing the change for a specific project ...if (project.name == "plugin_that_has_the_issue") { android { .... } }
2

go to the file:

~/flutter/.pub-cache/hosted/pub.dartlang.org/sharesdk_plugin-1.2.1/android/build.gradle

and change all compileSdkVersion to:

compileSdkVersion 28

ps: There may be more than 1 compileSdkVersion in build.gradle.

Comments

1

I also had same issue but the plugin was different. Firstly remove cache i.e Invalidate cache/restart then, add: android.enableAapt2=false in gradle.properties.

Comments

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.