Download

Cant build for android? Been at this for days

Hi all, I’m just trying to build one of the sample applications. For some reason I just cant get this to build. I will note the only wonkey thing I did was install tadp-4.0r2-osx not the one that came with the package. Any ideas on what is wrong. Im on a new macbook pro 10.01.3 Yosemite and using my note 4 running lollipop.

Here is my .bash_profile

export JAVA_HOME=$"/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre"
export PATH=$PATH:$JAVA_HOME/bin
export ANDROID_HOME="/Users/namey/Android/tools"
export PATH=$PATH:$ANDROID_HOME
export ANT_HOME="/usr/local/apache-ant-1.9.4"
export PATH=$PATH:$ANT_HOME/bin
export PATH=$PATH:/Users/name/Linameid/sdk/platform-tools

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin:/Users/name/Library/Android/sdk/bin:/usr/local/apache-ant-1.9.4/bin:/Users/name/Library/Android/sdk/tools:/Users/name/Library/Android/sdk/platform-tools

These are valid as I run or LS the outputted folders…
(added /java to this one. rest use ls)
name$ /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin/java
Usage: java -options] class [args…]
(to execute a class)
or java -options] -jar jarfile [args…]
(to execute a jar file)

ls /Users/name/Library/Android/sdk/tools/ant/
NOTICE build.xml uibuild.xml

name$ ls /Users/name/Library/Android/sdk/tools
NOTICE.txt emulator64-x86 proguard
android hierarchyviewer screenshot2
ant jobb source.properties
apps lib support
ddms lib64 templates
draw9patch lint traceview
emulator mksdcard uiautomatorviewer
emulator64-arm monitor
emulator64-mips monkeyrunner

name$ ls /usr/local/apache-ant-1.9.4/bin
ant antRun.pl runant.pl
ant.bat antenv.cmd runant.py
ant.cmd complete-ant-cmd.pl runrc.cmd
antRun envset.cmd
antRun.bat lcp.bat

name$ ls /Users/name/Library/Android/sdk/platform-tools
NOTICE.txt etc1tool sqlite3
adb fastboot systrace
api hprof-conv
dmtracedump source.properties

LogPlayLevel: InternalUtils.SafeFileExists: SafeFileExists /Users/name/Library/Android/sdk//platform-tools/adb=True
LogPlayLevel: CommandUtils.Run: Run: /Users/name/Library/Android/sdk//platform-tools/adb -s 0d27d04b shell getprop ro.product.cpu.abi
LogPlayLevel: CommandUtils.Run: Run: Took 0.094526s to run adb, ExitCode=0
LogPlayLevel: InternalUtils.SafeFileExists: SafeFileExists /Users/name/Library/Android/sdk//platform-tools/adb=True
LogPlayLevel: CommandUtils.Run: Run: /Users/name/Library/Android/sdk//platform-tools/adb -s 0d27d04b shell dumpsys SurfaceFlinger
LogPlayLevel: CommandUtils.Run: Run: Took 0.089444s to run adb, ExitCode=0
LogPlayLevel: UEDeployAndroid.MakeApk:
LogPlayLevel: ====5/30/2015 5:47:06 PM====PREPARING TO MAKE APK=================================================================
LogPlayLevel: Building Java with SDK API level ‘android-22’
LogPlayLevel: UEDeployAndroid.CheckDependencies: /Users/name/Documents/Unreal Projects/MyProject4/Binaries/Android/MyProject4-armv7-es2.apk is out of date due to newer input file /Users/Shared/UnrealEngine/4.7/Engine/Binaries/Android/UE4Game-armv7-es2.so
LogPlayLevel: UEDeployAndroid.MakeApk: Performing complete package - wiping /Users/name/Documentsnamejects/MyProject4/Intermediate/Android/APK, except for predexedLibs
LogPlayLevel: UEDeployAndroid.MakeApk: bPackageDataInsideApk = False
LogPlayLevel: UEDeployAndroid.UpdateProjectProperties:
LogPlayLevel: ====5/30/2015 5:47:08 PM====UPDATING BUILD CONFIGURATION FILES====================================================
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml…
LogPlayLevel: UEDeployAndroid.MakeApk:
LogPlayLevel: ====5/30/2015 5:47:09 PM====PREPARING NATIVE CODE=================================================================
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging…
LogPlayLevel: [armeabi-v7a] Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver
LogPlayLevel: [armeabi-v7a] Gdbsetup : libs/armeabi-v7a/gdb.setup
LogPlayLevel: [armeabi-v7a] Prebuilt : libUE4.so <= jni/armeabi-v7a/
LogPlayLevel: [armeabi-v7a] Install : libUE4.so => libs/armeabi-v7a/libUE4.so
LogPlayLevel: UEDeployAndroid.MakeApk:
LogPlayLevel: ====5/30/2015 5:47:10 PM====PERFORMING FINAL APK PACKAGE OPERATION================================================
LogPlayLevel: UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant… (note: it’s safe to ignore javac obsolete warnings)
LogPlayLevel: Error: JAVA_HOME is not defined correctly.
LogPlayLevel: We cannot execute $/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin/java
LogPlayLevel: BuildCommand.Execute: ERROR: BUILD FAILED
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception:
LogPlayLevel: Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: /bin/sh failed with args -c ‘"/usr/local/apache-ant-1.9.4/bin/ant" -quiet debug’
LogPlayLevel: Stacktrace: at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError (System.String WorkingDirectory, System.String Command, System.String Params, System.String OverrideDesc, Boolean bUseShellExecute) [0x00000] in <filename unknown>:0
LogPlayLevel: at UnrealBuildTool.Android.UEDeployAndroid.MakeApk (System.String ProjectName, System.String ProjectDirectory, System.String OutputPath, System.String EngineDirectory, Boolean bForDistribution, System.String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk) [0x00000] in <filename unknown>:0
LogPlayLevel: at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy (System.String ProjectName, System.String ProjectDirectory, System.String ExecutablePath, System.String EngineDirectory, Boolean bForDistribution, System.String CookFlavor, Boolean bIsDataDeploy) [0x00000] in <filename unknown>:0
LogPlayLevel: at AndroidPlatform.Deploy (AutomationTool.ProjectParams Params, DeploymentContext SC) [0x00000] in <filename unknown>:0
LogPlayLevel: at Project.Deploy (AutomationTool.ProjectParams Params) [0x00000] in <filename unknown>:0
LogPlayLevel: at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in <filename unknown>:0
LogPlayLevel: at BuildCookRun.ExecuteBuild () [0x00000] in <filename unknown>:0
LogPlayLevel: at BuildCommand.Execute () [0x00000] in <filename unknown>:0
LogPlayLevel: Program.Main: ERROR: ERROR: /bin/sh failed with args -c ‘"/usr/local/apache-ant-1.9.4/bin/ant" -quiet debug’
LogPlayLevel: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=1
LogPlayLevel: Domain_ProcessExit
LogPlayLevel: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 5.077513
LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully.

Hi Modder000,

Please have a look atthis AnswerHub thread where another user was seeing that same error.

If that does not help, can you post this info along with the entire failed build output log to AnswerHub?Here are instructions on what info is needed.

Thanks!

Your JAVA_HOME is set incorrectly: export JAVA_HOME=$"/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre"

If you have Java installed in your home directory then it should be JAVA_HOME="~/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre" …
… of if it is installed in opt or somewhere else - JAVA_HOME="/opt/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre"

Check your path of Java Home first.