Execution failed for task ‘:permission\_handler:compileDebugJavaWithJavac’

Issue

When I added permission_handler plugin in flutter. This Error Occured:

FAILURE: Build failed with an exception.

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

I tried to change the version of plugin and I also tried to run flutter clean but not worked.

If you know the answer of this question.Please answer this question.

Solution

changing the compileSdkVersion to 30 or 31 in android\app\build.gradle can fix this issue

Answered By – Amjad

Leave a Comment