close

[Solved] Execution failed for task ‘:camera:compileDebugJavaWithJavac’ in Flutter

Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. Execution failed for task ‘:camera:compileDebugJavaWithJavac’ in a flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How Execution failed for task ‘:camera:compileDebugJavaWithJavac’ in Flutter Error Occurs ?

I am trying to use camera plugin in my Flutter Project But I am facing following error.

C:\Users\ssc\FlutterSDK\flutter\.pub-cache\hosted\pub.dartlang.org\camera-0.9.4+4\android\src\main\java\io\flutter\plugins\camera\Camera.java:935: error: cannot find symbol EncoderProfiles getRecordingProfile() {

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ‘:camera:compileDebugJavaWithJavac’.
> Compilation failed; see the compiler error output for details.

* Try:
Run with –stacktrace option to get the stack trace. 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 16s
Exception: Gradle task assembleDebug failed with exit code 1

How to Solve Execution failed for task ‘:camera:compileDebugJavaWithJavac’ in Flutter Error?

  1. Execution failed for task ':camera:compileDebugJavaWithJavac' in Flutter

    To Solve Execution failed for task ':camera:compileDebugJavaWithJavac' in Flutter Error You Just need to update compileSdkVersion and targetSdkVersion to 31. Then Rebuild project And rerun Your project. Now, Your error must be solved.

  2. How to Solve Execution failed for task ':camera:compileDebugJavaWithJavac' in Flutter Error?

    To Solve Execution failed for task ':camera:compileDebugJavaWithJavac' in Flutter Error You Just need to update compileSdkVersion and targetSdkVersion to 31. Then Rebuild project And rerun Your project. Now, Your error must be solved.

Solution 1: Update compileSdkVersion and targetSdkVersion

You Just need to update compileSdkVersion and targetSdkVersion to 31. Then Rebuild project And rerun Your project. Now, Your error must be solved.

Summery

So, It’s All About This Error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.

Also Check Out Below Tutorials

Leave a Comment