Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task ':permission_handler:compileDebugJavaWithJavac'

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.

like image 422
Zilaid Avatar asked Apr 26 '26 04:04

Zilaid


2 Answers

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

like image 127
Amjad Avatar answered Apr 28 '26 18:04

Amjad


Most probably there is a chance that you are using an outdated dependency. Removing it can solve it. However, I was facing the same issue and changing "compileSdkVersion" to 31 in build.gradle solved my problem.

like image 26
Ashu Pathak Avatar answered Apr 28 '26 16:04

Ashu Pathak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!