Execution failed for task ':google_sign_in:verifyReleaseResources'

对着背影说爱祢 提交于 2021-02-10 05:37:15

问题


Ok so I have been building my flutter application , however, i can't figure you what to do in case of this error. I have been following this blog https://flutter.dev/docs/deployment/android , for the release build of my app .Everything worked fine , until i added

flutter build apk --split-per-abi

It gave me the following error,


FAILURE: 
Build failed with an exception.                                                        '
Execution failed for task ':google_sign_in:verifyReleaseResources'.             
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/shuvayan/Desktop/test/srijan2020-app/build/google_sign_in/intermediates/res/merged/release/values/values.xml:276:
 error: resource android:attr/fontVariationSettings not found.
  /Users/shuvayan/Desktop/test/srijan2020-app/build/google_sign_in/intermediates/res/merged/release/values/values.xml:277: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

I had the facebook_flutter_plugin and google_sign_in plugins installed for my application. After some google search a github issue pointed me to add in the android/app/build.gradle to force use compileSDKVersion 27 even it was given 28.

configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:27.1.0'
    }
}

However, this didn't solve my issue and my the error's still showing up. I would appreciate a little help on this matter.


回答1:


The problem lies with the plugin with it's specified dependency of compileSdkVersion which have been set to Android 27

update to the most recent version of the plugin, as of now 4.2.0

References:

https://pub.dev/packages/google_sign_in#-changelog-tab- https://github.com/flutter/plugins/blob/master/packages/google_sign_in/google_sign_in/android/build.gradle

https://github.com/flutter/flutter/issues/32595



来源:https://stackoverflow.com/questions/58683973/execution-failed-for-task-google-sign-inverifyreleaseresources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!