# Android Build Failing - Execution failed for task ':app:compileDebugJavaWithJavac'

**URL:** <https://forum.ionicframework.com/t/android-build-failing-execution-failed-for-task-compiledebugjavawithjavac/201188>\
**Category:** Appflow\
**Created:** [December 13, 2020, 10:33am UTC](https://forum.ionicframework.com/t/android-build-failing-execution-failed-for-task-compiledebugjavawithjavac/201188 "2020-12-13T10:33:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jabbarinho](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jabbarinho](https://forum.ionicframework.com/u/Jabbarinho)\
**Post date:** [December 13, 2020, 10:33am UTC](https://forum.ionicframework.com/t/android-build-failing-execution-failed-for-task-compiledebugjavawithjavac/201188/1 "2020-12-13T10:33:31Z")

</div>

Hello,

I’m very new to all of this (i. e. ionic framework, app development & u could say computers in general).  
I have been trying to develop an app with ionic frame work to export to iOS & android.  
Trying the web build it works well and i get the expected result (i. e. the same as i get w/ ionic serve).  
I am now trying to get my android build running.  
It has been 2 days now and I am stuck because of this error 🙂  
“Execution failed for task ‘:app:compileDebugJavaWithJavac’.” when running the command : “ionic cordova run android”.

I should probably mention that i installed for the first time ever on my machine yesterday :

- gradle
- android studio
- android sdk
- java jdk  
which as a result should all be up to date.

I have been setting my JAVA\_HOME & ANDROID\_HOME according to instructions i found on stack-overflow topics and the parameters seem right (i. e. i point to the corresponding folders on my hdd).

Any help would be much appreciated. I would def buy you a beer if you can get me to solve this 😅

cheers

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [December 16, 2020, 3:41pm UTC](https://forum.ionicframework.com/t/android-build-failing-execution-failed-for-task-compiledebugjavawithjavac/201188/2 "2020-12-16T15:41:46Z")

</div>

That means java is failing to compile, so would help if you provide the whole error and not just a small part of it.

---

<div class="post-metadata">

**Author:** ![amitkulkarni20](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@amitkulkarni20](https://forum.ionicframework.com/u/amitkulkarni20)\
**Post date:** [May 22, 2021, 4:16pm UTC](https://forum.ionicframework.com/t/android-build-failing-execution-failed-for-task-compiledebugjavawithjavac/201188/3 "2021-05-22T16:16:32Z")

</div>

I’m getting the same error and struggling to resolve it.  
Here’s what I see about it on console :  
[capacitor] \* What went wrong:  
[capacitor] Execution failed for task ‘:capacitor-android:compileDebugJavaWithJavac’.  
[capacitor] \> Failed to query the value of task ‘:capacitor-android:compileDebugJavaWithJavac’ property ‘options.generatedSourceOutputDirectory’.  
[capacitor] \> Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\CODELAB\POCs\ionicFireship\node\_modules@capacitor\android\capacitor\build\generated\ap\_generated\_sources\debug\out)) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer@7613d067) before task ‘:capacitor-android:compileDebugJavaWithJavac’ has completed is not supported

What would be the solution for this, please.
