So the 4.7 supports packaging for Android using Mac editor now. But I just can’t seem to get it packed. I’ve installed the TADP in the engine folder and set up Android SDK in project settings, like in this pic:
Ehi Vito! Try posting your log as code, it will be much clear.
As concern your problem: if you open a terminal can you run the command “java”?
The problem seems to be this one:
Error: JAVA_HOME is not defined correctly. MainFrameActions: Packaging (Android (All)): We cannot execute /System/Library/Frameworks/JavaVM.framework/Home/bin/java
The JAVA_HOME variable indeed is not indispensable, I don’t have it in my shell but I can package anyway.
I would try to fix this first, you probably just need to install the java optional package (not included by default anymore in Yosemite)
I can run “java” in command, it shows a lot of directions on how I should use this command. And I have actually installed Java SE Developer Kit 1.7, which is a prerequisite for installing the TADP tools.
The output would be /Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home and I set JAVA_HOME as you suggested but still no luck… Same error showed up in the log…
No it didn’t. “latest” and the option under it were set this way by default. I had to choose the first three options(location of SDK, NDK and ANT) manually though. Hopefully I’ve set them right.
Try uninstalling ant and then reinstalling it. I’m working with Yosemite, same ant version and same java version. Running and from command line should give you the following result:
xxxx-MacBook-Pro:~ xxxx$ ant
Buildfile: build.xml does not exist!
Build failed
Thank you for helping. I didn’t have any chance to reinstalling until now. But I still get error report when packaging for Android. I’m using Yosemite too and have the exact same result when I run ant from terminal.
I’ve checked my settings and it seems that apart from some difference in version(my Java is 1.7 and NDK is r10), I’ve got everything right.
Unless I was wrong about how to change environment variable in OS X… I used terminal and typed nano .bash_profile and edit it so it’s exactly as the document instructed(actually they were all there and I only added a JAVA_HOME line which is allegedly windows only) and then I ran source .bash_profile