I wanted to test my flutter app in phone. So i tried build an apk. I ran this in app files:
flutter build apk --split-per-abi
results:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Can Ahmet\StudioProjects\myapp\myapp\android\app\build.gradle' line: 26
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not open cp_dsl generic class cache for script 'C:\SRC\flutter\packages\flutter_tools\gradle\flutter.gradle' (C:\Users\Can Ahmet\.gradle\caches\7.4\scripts\926y60l3pifaoznpot8d19f2t).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* 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
BU�LD FAILED in 14s
Running Gradle task 'assembleRelease'... 17,5s
Gradle task assembleRelease failed with exit code 1
How can i solve that?
I tried run with --stacktrace
option to get the stack trace.
result:
Could not find an option named "stacktrace".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
I tried run with --debug
option to get more log output.
result:
'build' is not recognized as an internal or external command,
operable program or batch file.
Did i wrong write?