Android Packaging Error - PackagingResults:Error: Error Unknown Error

Hello,

I’m trying to build a blank project for Android using my mac, and the build keeps failling due to this error in the log:

UATHelper: Packaging (Android (ATC)): UnrealBuildTool: -compile:
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac] Compiling 1 source file to /Users/xxxxxxxxxxxxxxxx/Documents/Unreal Projects/VR_X1/Intermediate/Android/APK/JavaLibs/support-v4-23.0.0/bin/classes
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac] /Users/xxxxxxxxxxxxxxxx/Documents/Unreal Projects/VR_X1/Intermediate/Android/APK/JavaLibs/support-v4-23.0.0/gen/android/support/v4/BuildConfig.java:4: cannot access java.lang.Object
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac] bad class file: java/lang/Object.class(java/lang:Object.class)
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac] class file has wrong version 52.0, should be 50.0
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac] public final class BuildConfig {
UATHelper: Packaging (Android (ATC)): UnrealBuildTool:     [javac]              ^
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: 
UATHelper: Packaging (Android (ATC)): UnrealBuildTool: BUILD FAILED

I’ve found that this error means that javac is trying to compile with an earlier version than the one I have installed (1.6 while I have 1.8 installed). But contrary to all the screen shot I find on the internet I cannot setup java sdk in the sdkConfig:

Is this due to the fact that I use a mac? How can I configure the jdk properly?

Thanks!

DoomDarkness,

You need to use 4.14 to package using Android-24. Have you tried 4.14 yet?

Thanks!

Thanks!

For anyone else in the same situation:

First define you environment variable by using the terminal and typing:
emacs .bash_profile

and adding the line:
export JAVA_HOME=“/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home”

at the end of the file (press ctrl+x and then ctrl+s to save). Type in the jdk version you are using (I’m using 1.8.0_92 in this case)

That fixed the error above but I still had another error which was fixed by simply updating to unreal 4.15.

Everything works fine now!

Cheers!

Thanks!

For anyone else in the same situation:

First define you environment variable by using the terminal and typing:
emacs .bash_profile

and adding the line at the end of the file:
export JAVA_HOME=“/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home”

(Obviously you need to set the jdk version according to the one you’re using. In my case, as you can see, it’s 1.8.0_92)

Press ctrl+x and then ctrl+s to save.

That fixed the error above but I still had another error which was fixed by simply updating to unreal 4.15.

Everything works fine now!

Cheers!