Java/Gradle preventing from packaging Android build

Hello, I’m trying to make an android build of a project (Android (ETC1) but i’m encountering an error I don’t understand during the packaging.

I don’t really know where to look as the solutions I find only talk about adding some code lines. But I didn’t had any code in the project, it’s only blueprint based.

Do I miss an sdk ? or something else ?

Thanks for your help.

UATHelper: Packaging (Android (ETC1)): :downloader_library:generateDebugBuildConfig
UATHelper: Packaging (Android (ETC1)): :downloader_library:prepareLintJar
UATHelper: Packaging (Android (ETC1)): :downloader_library:generateDebugSources
UATHelper: Packaging (Android (ETC1)): :downloader_library:javaPreCompileDebug
UATHelper: Packaging (Android (ETC1)): :downloader_library:compileDebugJavaWithJavac
UATHelper: Packaging (Android (ETC1)): :downloader_library:processDebugJavaRes NO-SOURCE
UATHelper: Packaging (Android (ETC1)): :downloader_library:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
UATHelper: Packaging (Android (ETC1)): :app:javaPreCompileDebug

UATHelper: Packaging (Android (ETC1)): Z:\app\src\main\java\com\epicgames\ue4\ error: package does not exist

UATHelper: Packaging (Android (ETC1)): import;

UATHelper: Packaging (Android (ETC1)): ^
UATHelper: Packaging (Android (ETC1)): 1 error

UATHelper: Packaging (Android (ETC1)): :app:compileDebugJavaWithJavac FAILED

UATHelper: Packaging (Android (ETC1)): FAILURE: Build failed with an exception.

UATHelper: Packaging (Android (ETC1)): * What went wrong:

UATHelper: Packaging (Android (ETC1)): Execution failed for task ‘:app:compileDebugJavaWithJavac’.

UATHelper: Packaging (Android (ETC1)): > Compilation failed; see the compiler error output for details.

UATHelper: Packaging (Android (ETC1)): * Try:
UATHelper: Packaging (Android (ETC1)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
UATHelper: Packaging (Android (ETC1)): * Get more help at
UATHelper: Packaging (Android (ETC1)): BUILD FAILED in 45s
UATHelper: Packaging (Android (ETC1)): 38 actionable tasks: 38 executed
UATHelper: Packaging (Android (ETC1)): ERROR: cmd.exe failed with args /c “C:\Users\franc\Documents\Unreal Projects\Sheepdog\Intermediate\Android\APK\gradle\rungradle.bat” :app:assembleDebug
UATHelper: Packaging (Android (ETC1)): (see C:\Users\franc\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.23\Log.txt for full exception trace)
UATHelper: Packaging (Android (ETC1)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ETC1)): BUILD FAILED
PackagingResults: Error: Unknown Error
LogSlate: FSceneViewport::OnFocusLost() reason 0
LogSlate: Took 0.000353 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/Slate/Fonts/DroidSansMono.ttf’ (77K)
LogEditorSessionSummary: EditorSessionSummary sent report. Type=AbnormalShutdown, SessionId={EC3A5B89-47DA-84F4-A83C-AAA803B1EF13}

Plus, when it gets to “UATHelper: Packaging (Android (ETC1)): Z:\app\src\main\java\com\epicgames\ue4\ error: package does not exist” what I find weird it that I never had a Z:\ hardrive on my computer. I created like a ghost hardrive Z when trying to package.

Z:\ is a virtual hard drive, the real path is [your project]/Intermediate/Build/Android. Check if googe vr plugin is enabled.

Ok, thanks for the info.

Yeah I tried to build with the google VR plugin enabled and disabled and I get the same issue.

Not Solved, for me at least. Any news on this?

Nope. I create another thread on the unreal engine android section of the forum becasue I can’t find any help on this :’(

I managed to solve this in custom 4.24 by modifying Engine\Build\Android\Java\src\com\epicgames\ue4\

remove “import;”
add “import android.Manifest;”

replace permission handling with:

it compiles now, and hopefully works too :smiley:

please find my version of attached

is this what I should end up with ??

import android.Manifest;

import android.Manifest.checkCallingOrSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)!=PackageManager.PERMISSION_GRANTED;

import android.Manifest.checkCallingOrSelfPermission(Manifest.permission.GET_ACCOUNTS)==PackageManager.PERMISSION_GRANTED;

It worked like a charm. Thank you for your help mate. Sending you love <3

WOW! Thanks looking for this for 5 days!