Error packaging for android

the error message show that the build.xml is missing, in normal case, there’s a build.xml under the ProjectFolder/Intermediate/Android/APK/

so maybe you should check your android sdk path and ndk path setting in the project setting.

Hi there guys, i hope that someone could help me out with this. I have set up my ue4 project to develop for android. I have followed the ue4 tutorial on how to package for android as well, i have installed CODEWORKS and made sure evrything is installed i have also made sure that in ue4 android it is showing to the right root as well. I then plug my phone in and try launching it on my device, And i keep getting errors. I have also tried to package the game with no success as well. I have packaged it for windows and it works fine that way. I will Post the Output log with the error. I have also tried to google this issue, but with no actual answer, showing up. I have also cleared the saved folder and still did not work. When i open a new project and try package, it does still not work out.

LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndReturnResult: Making .apk with Ant… (note: it’s safe to ignore javac obsolete warnings)
LogPlayLevel: Buildfile: build.xml does not exist!
LogPlayLevel: Build failed
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndReturnResult: Making .apk with Ant again to show errors
LogPlayLevel: Buildfile: build.xml does not exist!
LogPlayLevel: Build failed
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: System.IO.FileNotFoundException: Could not find file ‘C:\Users\deegi\Desktop\EndlessRunner\Intermediate/Android/APK/bin/EndlessRunner-debug.apk’.
LogPlayLevel: File name: ‘C:\Users\deegi\Desktop\EndlessRunner\Intermediate/Android/APK/bin/EndlessRunner-debug.apk’
LogPlayLevel: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
LogPlayLevel: at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
LogPlayLevel: at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
LogPlayLevel: at UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
LogPlayLevel: at AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC)
LogPlayLevel: at Project.Deploy(ProjectParams Params)
LogPlayLevel: at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel: at BuildCookRun.ExecuteBuild()
LogPlayLevel: at AutomationTool.BuildCommand.Execute()
LogPlayLevel: at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
LogPlayLevel: at AutomationTool.Automation.Process(String[] Arguments)
LogPlayLevel: at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel: at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
LogPlayLevel: at AutomationTool.Program.Main()
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 40.535103
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Launch failed! Unknown Error

Hi there, Please find attached the file path, that i have set up. It is in the right place.

Program.Main: ERROR: AutomationTool terminated with exception: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Users\deegi\Desktop\test\MyProject\Intermediate/Android/APK/bin/MyProject-debug.apk’.

I also just want to find out what the (-debug.apk) is?

the NDK API Level should be: android-19?

there’s no apk, because build failed.
Would you please post the full log, from your log, the direct reason is no build.xml under the
C:\Users\deegi\Desktop\test\MyProject\Intermediate/Android/APK/
so when the engine use “ant debug” to generate apk, it will fail.
Then we need to find out why there’s no build.xml, there must be other error before your post content.

By the way, if you project include c++ code, the “android 19” setting should build fail, the right is “android-19”.

The game crashed, you may need use adb logcat to check the output and crash stack trace,
The most case is c++ code memory problem

I see that that was the issue, it changed to 26, after i installed all the content on there. But now after running it it has compiled with no issue. But when i open it up on my phone it says, (gamename) has stopped close app. Any ideas to what the issue might be why it does not want to open on the phone.Thanks for the help

link text

Hi, this is the launch log, show you build success and install success,
but with this log, can’t find any useful information about crash.
with usb connect with your computer, you can run “adb logcat” from cmd, then start your app from mobile. The log will show the crash info.

Hi sorry for the late reply, first time i am sitting down at my pc. I am new to this and don’t rely understand what the cmd message is saying. Please find attached a copy of what cmd is saying.

08-30 21:59:33.990 3627 3627 I Timeline: Timeline: Activity_launch_request id:com.YourCompany.EndlessRunner time:143371222
08-30 21:59:33.992 2177 8601 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.YourCompany.EndlessRunner/com.epicgames.ue4.SplashActivity bnds=[381,800][732,1060]} from uid 10114 on display 0
08-30 21:59:34.003 2177 8601 D ActivityTrigger: ActivityTrigger activityPauseTrigger
08-30 21:59:34.027 2177 8604 I ActivityManager: Start proc 12122:com.YourCompany.EndlessRunner/u0a17 for activity com.YourCompany.EndlessRunner/com.epicgames.ue4.SplashActivity
08-30 21:59:34.031 12122 12122 I art : Late-enabling -Xcheck:jni
08-30 21:59:34.069 12122 12122 I art : Starting a blocking GC AddRemoveAppImageSpace
08-30 21:59:34.091 12122 12122 I Timeline: Timeline: Activity_launch_request id:com.YourCompany.EndlessRunner time:143371324
08-30 21:59:34.091 2177 10253 I ActivityManager: START u0 {act=android.intent.action.MAIN flg=0x10000 cmp=com.YourCompany.EndlessRunner/com.epicgames.ue4.GameActivity (has extras)} from uid 10017 on display 0
08-30 21:59:34.094 2177 10253 D ActivityTrigger: ActivityTrigger activityPauseTrigger
08-30 21:59:34.353 2177 2215 I art : Starting a blocking GC Alloc
08-30 21:59:34.353 2177 2215 I art : Starting a blocking GC Alloc
08-30 21:59:34.365 2177 2215 I art : Alloc sticky concurrent mark sweep GC freed 3030(209KB) AllocSpace objects, 2(40KB) LOS objects, 4% free, 351MB/367MB, paused 1.123ms total 11.758ms
08-30 21:59:34.365 2177 2215 I art : Starting a blocking GC Alloc
08-30 21:59:34.439 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.439 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.444 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.451 12122 12122 I art : Alloc partial concurrent mark sweep GC freed 98(4KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 5MB/8MB, paused 151us total 6.681ms
08-30 21:59:34.451 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.462 12122 12122 I art : Alloc concurrent mark sweep GC freed 6(144B) AllocSpace objects, 0(0B) LOS objects, 40% free, 5MB/8MB, paused 166us total 11.429ms
08-30 21:59:34.462 12122 12122 I art : Forcing collection of SoftReferences for 315MB allocation
08-30 21:59:34.462 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.472 12122 12122 I art : Alloc concurrent mark sweep GC freed 3(72B) AllocSpace objects, 0(0B) LOS objects, 40% free, 5MB/8MB, paused 158us total 10.105ms
08-30 21:59:34.473 12122 12122 W art : Throwing OutOfMemoryError “Failed to allocate a 331107312 byte allocation with 3729440 free bytes and 186MB until OOM”
08-30 21:59:34.473 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.473 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.475 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.481 12122 12122 I art : Alloc partial concurrent mark sweep GC freed 6(144B) AllocSpace objects, 0(0B) LOS objects, 40% free, 5MB/8MB, paused 142us total 5.722ms
08-30 21:59:34.481 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.491 12122 12122 I art : Alloc concurrent mark sweep GC freed 3(72B) AllocSpace objects, 0(0B) LOS objects, 40% free, 5MB/8MB, paused 152us total 10.036ms
08-30 21:59:34.491 12122 12122 I art : Forcing collection of SoftReferences for 315MB allocation
08-30 21:59:34.491 12122 12122 I art : Starting a blocking GC Alloc
08-30 21:59:34.501 12122 12122 I art : Alloc concurrent mark sweep GC freed 3(72B) AllocSpace objects, 0(0B) LOS objects, 40% free, 5MB/8MB, paused 155us total 10.031ms
08-30 21:59:34.501 12122 12122 W art : Throwing OutOfMemoryError “Failed to allocate a 331107312 byte allocation with 3733376 free bytes and 186MB until OOM”
08-30 21:59:34.502 12122 12122 D skia : — allocation failed for scaled bitmap
08-30 21:59:34.517 12122 12122 D AndroidRuntime: Shutting down VM
08-30 21:59:34.518 12122 12122 E AndroidRuntime: FATAL EXCEPTION: main
08-30 21:59:34.518 12122 12122 E AndroidRuntime: Process: com.YourCompany.EndlessRunner, PID: 12122
08-30 21:59:34.518 12122 12122 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 331107312 byte allocation with 3733376 free bytes and 186MB until OOM
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:620)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:455)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1155)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:720)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:571)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.content.res.Resources.getDrawable(Resources.java:775)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.content.Context.getDrawable(Context.java:529)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2577)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2627)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2047)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.ActivityTransitionState.setEnterActivityOptions(ActivityTransitionState.java:158)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.Activity.performCreateCommon(Activity.java:6715)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6722)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2673)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2781)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1508)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.os.Looper.loop(Looper.java:241)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6274)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
08-30 21:59:34.518 12122 12122 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
08-30 21:59:34.553 2177 2617 D ActivityManager: New dropbox entry: com.YourCompany.EndlessRunner, data_app_crash, 08b28cac-7f37-4b46-811d-32ed9221344e
08-30 21:59:34.553 2177 2215 I art : Alloc partial concurrent mark sweep GC freed 4801(250KB) AllocSpace objects, 1(315MB) LOS objects, 30% free, 35MB/51MB, paused 1.323ms total 188.080ms
08-30 21:59:34.560 681 681 D clmlib : Got activities:0x00000008
08-30 21:59:34.560 681 681 I JavaDumper:JavaDumperThread: addEvent: data_app_crash@1504123174560.txt processName: com.YourCompany.EndlessRunner
08-30 21:59:34.560 681 752 I JavaDumper:JavaDumperThread: Event: data_app_crash@1504123174560.txt TimeStamp: 1504123174
08-30 21:59:34.562 2177 2177 I BroadcastQueue: am_broadcast_enqueue: [background,1,Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) },3]
08-30 21:59:34.563 681 752 W JavaDumper:JavaDumper: Could not init dump dir: Unknown error -95
08-30 21:59:34.563 681 752 E JavaDumper:FW: utils.c(256): mkdir (/data/crashdata) failed. File exists
08-30 21:59:34.565 681 752 E JavaDumper:FW: ramdump_framework.c(317): fp is NULL
08-30 21:59:34.565 681 752 E JavaDumper:FW: ramdump_framework.c(498): Read-only file system
08-30 21:59:34.583 2177 2209 I InputDispatcher: Focus entered window: Window{7c59f3c u0 Application Error: com.YourCompany.EndlessRunner}
08-30 21:59:34.589 2177 2874 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) }]
08-30 21:59:34.595 2177 2208 W ActivityManager: Activity pause timeout for ActivityRecord{e1991ae u0 com.YourCompany.EndlessRunner/com.epicgames.ue4.SplashActivity t9399 f}
08-30 21:59:34.608 681 752 E JavaDumper:FW: JavaDumper.cpp(262): Failed to remove /tmp/dropbox.txt:Unknown error -2
08-30 21:59:34.612 2177 18723 I OpenGLRenderer: Initialized EGL, version 1.4
08-30 21:59:34.612 2177 18723 D OpenGLRenderer: Swap behavior 1
08-30 21:59:34.613 2177 2212 I BroadcastQueue: am_broadcast_enqueue: [background,1,Intent { act=com.sonymobile.crashmonitorsystemservice.DIR_UPDATED flg=0x10 (has extras) },2]
08-30 21:59:34.623 11986 11986 I RcaHandler: Forwarding intent: com.sonymobile.crashmonitorsystemservice.DIR_UPDATED
08-30 21:59:34.626 2177 3609 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=com.sonymobile.crashmonitorsystemservice.DIR_UPDATED flg=0x10 (has extras) }]
08-30 21:59:34.630 11986 12142 I RcaHandler: fileName = tlcore_java_07
08-30 21:59:34.632 11986 12142 I RcaHandler: Handle JAVA-dumpfile with UUID:A5CE60B2-7D85-44D2-8E2B-F2421DB2A4F4-5C968EA9 from:JavaDumper named:/data/crashdata/tlcore_java_07
08-30 21:59:34.644 11986 12142 I RcaHandler: Added event. Result: 0, crashId: A5CE60B2-7D85-44D2-8E2B-F2421DB2A4F4-5C968EA9, Probe: RcaInfoProbeExtended
08-30 21:59:34.645 11986 12142 I RcaHandler: Added event. Result: 0, crashId: A5CE60B2-7D85-44D2-8E2B-F2421DB2A4F4-5C968EA9, Probe: RcaInfoProbeCompact
08-30 21:59:34.645 11986 12142 I RcaHandler: Saved JAVA_SYSTEM_APP (ID:84419cf3-10a0-4120-9f99-c51ca594e5b8) to IDD
08-30 21:59:34.645 11986 12142 I RcaHandler: Added entry JAVA to rca-list
08-30 21:59:34.667 2177 31779 I BroadcastQueue: am_broadcast_enqueue: [background,1,Intent { act=com.sonymobile.crashmonitor.CRASH_STATUS flg=0x10 (has extras) },1]
08-30 21:59:34.673 2177 2192 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=com.sonymobile.crashmonitor.CRASH_STATUS flg=0x10 (has extras) }]
08-30 21:59:34.682 2177 2187 I art : Background partial concurrent mark sweep GC freed 2218(210KB) AllocSpace objects, 0(0B) LOS objects, 4% free, 351MB/367MB, paused 1.535ms total 112.158ms
08-30 21:59:35.577 7275 7275 I Ads : Ad is not visible. Not refreshing ad.
08-30 21:59:35.577 7275 7275 I Ads : Scheduling ad refresh 60000 milliseconds from now.
08-30 21:59:35.909 7275 7275 I Ads : Ad is not visible. Not refreshing ad.
08-30 21:59:35.909 7275 7275 I Ads : Scheduling ad refresh 60000 milliseconds from now.

seems like your game alloc a large memory(331107312 bytes), so crashed, if your phone is 512M ram, then alloc the large memory will crash the app.
maybe you can change a large memory phone to test if this cause the crash.

Hit there my phone has a total of 2 gig ram. And have tried it now on a p9 and a p8 and stil no luck with it, it just keeps on crashing. Any more suggestions that i can still try out.???