ANDROID Package Project: Error: Could not initialize class

I’ve donwloaded unreal 4.25 and i cant pckage my android game. In the output log it says in red

Error: Could not initialize class

  • What went wrong:
    Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

I’ve installed Android studio 3.5.3 and unistalled codeworks as said in unreal page, im using ndk r21b

2 days have passed and i cant package my project, can someone help please?

Same problem here.
I tried JDK13, JDK14, Gradle6.4, Gradle6.2, Gradle Older versions, everything keeps failing.

Fixed. The JDK folder must be Java Development Kit (64bit) 8 Update 151 to match a prerequisite of Gradle 5.4.1 used by UE4.25.
I had a few more problems solved by adding Plugins: Google VR, Online Subsystems Google, Online Subsystems GooglePlay. And by disabling Project Settings > Engine > Rendering > Support Material Layers.

2 Likes

Worked Thanks :slight_smile: