Android packaging in Unreal Engine: Execution failed for task
The cook may have succeeded, but the Android build step failed: Gradle stopped on task :app:.... This usually means the Android toolchain does not match what the engine version expects.
Paste your log: find the cause in seconds Runs in your browser, nothing is uploaded.
Common causes
- Android SDK, NDK, build-tools or JDK versions that do not match the engine version.
- Several JDKs installed and the wrong one picked up by JAVA_HOME.
- A plugin adding incompatible Android libraries.
How to fix it
- Read the Gradle output right after this line: the "What went wrong" section names the real problem.
- Check your engine version's Android setup page for the expected NDK, SDK platform, build-tools and JDK versions.
- Run SetupAndroid.bat from Engine/Extras/Android, then set the SDK, NDK and JDK paths in Project Settings > Platforms > Android SDK.
- Delete the project's Intermediate/Android folder and package again.
Questions
Can it be caught before cooking?
Yes, it can be checked before you start a cook: Compare installed SDK, NDK and JDK versions with the engine's support matrix.