build apk error gradle

How to solve this problem please

 *  Executing task: C:\flutter\bin\flutter.bat build apk 


 Building with sound null safety 

lib/pages/video_article_details.dart:72:42: Error: The argument type 'EdgeInsets' can't be assigned to the parameter type 'Margins?'.
 - 'EdgeInsets' is from 'package:flutter/src/painting/edge_insets.dart' ('/C:/flutter/packages/flutter/lib/src/painting/edge_insets.dart').   
 - 'Margins' is from 'package:flutter_html/src/style/margin.dart' ('../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.6/lib/src/style/margin.dart').
                      margin: EdgeInsets.zero,
                                         ^
lib/pages/video_article_details.dart:78:44: Error: The argument type 'EdgeInsets' can't be assigned to the parameter type 'Margins?'.
 - 'EdgeInsets' is from 'package:flutter/src/painting/edge_insets.dart' ('/C:/flutter/packages/flutter/lib/src/painting/edge_insets.dart').   
 - 'Margins' is from 'package:flutter_html/src/style/margin.dart' ('../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.6/lib/src/style/margin.dart').
                        margin: EdgeInsets.zero, padding: EdgeInsets.zero),
                                           ^
lib/widgets/html_body.dart:41:36: Error: Member not found: 'NORMAL'.
            whiteSpace: WhiteSpace.NORMAL,
                                   ^^^^^^
lib/widgets/html_body.dart:37:32: Error: The argument type 'EdgeInsets' can't be assigned to the parameter type 'Margins?'.
 - 'EdgeInsets' is from 'package:flutter/src/painting/edge_insets.dart' ('/C:/flutter/packages/flutter/lib/src/painting/edge_insets.dart').   
 - 'Margins' is from 'package:flutter_html/src/style/margin.dart' ('../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.6/lib/src/style/margin.dart').
            margin: EdgeInsets.zero,
                               ^
lib/widgets/html_body.dart:46:32: Error: The argument type 'EdgeInsets' can't be assigned to the parameter type 'Margins?'.
 - 'EdgeInsets' is from 'package:flutter/src/painting/edge_insets.dart' ('/C:/flutter/packages/flutter/lib/src/painting/edge_insets.dart').   
 - 'Margins' is from 'package:flutter_html/src/style/margin.dart' ('../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.6/lib/src/style/margin.dart').
            margin: EdgeInsets.all(textPadding == null ? 20.0 : textPadding!)),
                               ^
lib/widgets/html_body.dart:47:44: Error: The argument type 'EdgeInsets' can't be assigned to the parameter type 'Margins?'.
 - 'EdgeInsets' is from 'package:flutter/src/painting/edge_insets.dart' ('/C:/flutter/packages/flutter/lib/src/painting/edge_insets.dart').   
 - 'Margins' is from 'package:flutter_html/src/style/margin.dart' ('../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.6/lib/src/style/margin.dart').
        "figure": Style(margin: EdgeInsets.zero, padding: EdgeInsets.zero),
                                           ^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1154

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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 3m 29s
Running Gradle task 'assembleRelease'...                          213.6s
Gradle task assembleRelease failed with exit code 1

 *  The terminal process "C:\flutter\bin\flutter.bat 'build', 'apk'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Gradle is the build tool here that is delegating to a Flutter command. It doesn’t look like there is any issue with Gradle executing the command, but there are problems with the Flutter code. The Flutter community would likely know more about what is wrong than the Grade community.

2 Likes
Building with sound null safety 

error: error reading C:\Users\deuts\.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-common-java8\2.4.0-beta01\5b8f86fea035328fc9e8c660773037a3401ce25f\lifecycle-common-java8-2.4.0-beta01.jar; zip END header not found
error: error reading C:\Users\deuts\.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-common\2.4.0-beta01\1fdb7349701e9cf2f0a69fc10642b6fef6bb3e12\lifecycle-common-2.4.0-beta01.jar; zip END header not found
C:\Users\deuts\OneDrive\Bureau\vox\NewsPro v2.1.0\newspro\news_pro\build\better_player\generated\source\buildConfig\release\com\jhomlala\better_player\BuildConfig.java:4: error: cannot access com.jhomlala.better_player
package com.jhomlala.better_player;
^
  zip END header not found
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':better_player:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 1m 8s
Running Gradle task 'assembleRelease'...                           72.1s
Gradle task assembleRelease failed with exit code 1

 *  The terminal process "C:\flutter\bin\flutter.bat 'build', 'apk'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

This usually means you have corrupt files. I would minimally clean the project, delete the mentioned JAR files from the cache, and then try again.