FAILURE: Build failed with an exception.

3828 ワード

flutterでこのエラーが発生した場合、
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':xs_progress_hud:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  D:\program\companyProject\02_flutter_app_contractor\build\xs_progress_hud\intermediates\res\merged\release\values\values.xml:236: error: resource android:attr/fontVariationSettings not found.
  D:\program\companyProject\02_flutter_app_contractor\build\xs_progress_hud\intermediates\res\merged\release\values\values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 Get more help at https://help.gradle.org
BUILD FAILED in 56s

D:*programflutter.pub-cache\hosted\pub.flutter-io.cn*、フォルダの下で対応する競合依存プラグインを検索し、変更プラグインのandroidフォルダの下のbuildを開きます.gradleファイルの
android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 16
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
}

このコードの中のcompileSdkValerson 28は、現在28は28を変更して、30は30を変更して、すべて変更するのは悪くありません