Getting below error while building the code * What went wrong: Execution failed for task ':testapp:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace

Unable to build the code while executing, getting below error.

  • What went wrong:
    Execution failed for task ‘:KNOXTESTAPP:compileDebugJavaWithJavac’.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface

Below are the versions used.
Gradle Version: 7.6.1 and also tried with 6.7.1
Android studio pluginversion: 4.2
Java8

Not sure what you are asking here.
The message clearly tells you that your code does not compile and that you should look at the compiler output.
So scroll up and look at the compiler output. :slight_smile: