i installed flutter sdk succesfully slong with android sdk flutter doctor detects no error (except that i have not installed android studio, vscode is fine) after i created a dummy project to test the flutter everything worked fine until i tried to build the apk it threw me a terminal full of errors that i am not able to get. is there any solution to resilve this error of this gradle thing...?
PS D:\Projects\Applications\tasbeeh> flutter build apk
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Projects\Applications\tasbeeh\android\build.gradle'
* What went wrong:
Could not compile build file 'D:\Projects\Applications\tasbeeh\android\build.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284)
at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:57)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:44)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveNonArrayType(AsmReferenceResolver.java:79)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveType(AsmReferenceResolver.java:70)
it is just a part of the error here is another part of the error which i thought would be helpful to resolve this issue
1 error
* 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.
-scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Running Gradle task 'assembleRelease'... 2,309ms
Gradle task assembleRelease failed with exit code 1
PS D:\Projects\Applications\tasbeeh> flutter build apk --no-shrink
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Projects\Applications\tasbeeh\android\build.gradle'
* What went wrong:
Could not compile build file 'D:\Projects\Applications\tasbeeh\android\build.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 61
last piece of error
* 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 992ms
Running Gradle task 'assembleRelease'... 2,049ms
Gradle task assembleRelease failed with exit code 1