# Android dev with AGDE using VS 2022

**URL:** <https://forums.unrealengine.com/t/android-dev-with-agde-using-vs-2022/594804>\
**Category:** Mobile\
**Tags:** unreal-engine, UE5-0, Android, question\
**Created:** [July 1, 2022, 9:49am UTC](https://forums.unrealengine.com/t/android-dev-with-agde-using-vs-2022/594804 "2022-07-01T09:49:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PHoriaP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PHoriaP](https://forums.unrealengine.com/u/PHoriaP)\
**Post date:** [July 1, 2022, 9:49am UTC](https://forums.unrealengine.com/t/android-dev-with-agde-using-vs-2022/594804/1 "2022-07-01T09:49:47Z")

</div>

Hello,

I’ve build a game using UE5 on Windows that uses BLE through WinRT, and for that I’ve transitioned to Visual Studio 2022, which knows how to correctly interpret WinRT code (vs previous versions).  
I’ve ported the game on Android and I’m trying to use Visual Studio to debug why my game is not starting on the mobile device. I found that the new preferred way is using the Android Game Development Extension (AGDE) for VS. I’ve installed the latest AGDE version (that has VS 2022 support), but it requires JDK 11 or newer. If I change JDK version (point JAVA\_HOME to another JDK than the default JDK 8 / 1.8.151), I get the “Could not initialize class org.codehaus.groovy.reflection.ReflectionCache” error - which happens if you don’t have JDK 8 (as I’ve read on this forum).

Do you have any solutions for debugging a UE5 project on Android from VS 2022?

Thank you!  
Horia

---

<div class="post-metadata">

**Author:** ![MOTYSHIZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MOTYSHIZ](https://forums.unrealengine.com/u/MOTYSHIZ)\
**Post date:** [December 28, 2022, 6:44pm UTC](https://forums.unrealengine.com/t/android-dev-with-agde-using-vs-2022/594804/2 "2022-12-28T18:44:04Z")

</div>

Hey there, I am currently having the exact same problem, but with 4.27.  
Did you ever find a solution?  
I tried manually setting a jdb.exe location for the AGDE Debugger with a different Java environment variable, but it resulted in my Quest 2 not being recognized, so JAVA\_HOME is likely being used by AGDE more extensively than this.

---

<div class="post-metadata">

**Author:** ![MOTYSHIZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MOTYSHIZ](https://forums.unrealengine.com/u/MOTYSHIZ)\
**Post date:** [December 28, 2022, 7:05pm UTC](https://forums.unrealengine.com/t/android-dev-with-agde-using-vs-2022/594804/3 "2022-12-28T19:05:08Z")

</div>

So far, JDK 11 (11.0.16.1 specifically) has been working. Build was successful, AGDE didn’t complain and recognized the Quest 2.

In between switching JAVA\_HOME, it is important to delete the project’s Intermediate folder and right click the .uproject to Generate Visual Studio Files.  
I tried just deleting Intermediate/Android/ and it didn’t work, so there must be more in the Intermediate folder that relies on Java\_Home.  
I imagine doing a full rebuild from editor would probably work similarly.

---

<div class="post-metadata">

**Author:** ![surmounter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@surmounter](https://forums.unrealengine.com/u/surmounter)\
**Post date:** [August 18, 2023, 4:06pm UTC](https://forums.unrealengine.com/t/android-dev-with-agde-using-vs-2022/594804/4 "2023-08-18T16:06:50Z")

</div>

> [@MOTYSHIZ](#):
>
> it is important to delete the project’s Intermediate folder and right clicking the .uproject to Generate Visual Studio Files.

This worked!
