Unable to compile apks using BuildServer

I was trying to compile apks, but the build is failing with exceptions. I confirm I did all the setup instructions. Then i tried to check if companion is building or not and i also fails.
log.txt (31.9 KB)

Note : I didnt modify Compiler.java

Maybe you should check these lines? Perhaps you modified one of the build.xml files?

No modifications done

I'm not sure, but is your Java version not set to 8?

java version "1.8.0_361"
Java(TM) SE Runtime Environment (build 1.8.0_361-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.361-b09, mixed mode)

A further look indicates that : formOrientations.get() is somehow null

@ewpatton is there some bug sort of thing with the device orientation issue fix PR?

PS : Commenting out those lines and adding orientation manually seems to work

The only way I can see that happening is if the compiler is invoked in a way that doesn't provide the formOrientations field. It's computed in ProjectBuilder.java and passed to the compiler, so it should never be null in this case. How are you invoking the build server that you're getting an NPE here?

No modifications in source. Just executing the Build Apk action

Your log file indicates an error when building the PlayApp. However, I just did a clean checkout of master and ran ant -Dskip.ios=true and I didn't receive that exception. Potentially it could be a Windows-specific issue but I don't really understand why if that's the case. I'll set up a Windows VM and see if I can replicate it there.

1 Like

Your help is always appreciated sir :slightly_smiling_face:

Ok. This does fail on Windows, but not macOS or Linux. That suggests to me that it might be something to do with line endings.

1 Like

Actually, the issue turned out to be the file separator.

1 Like

A pull request to fix the issue is now available:

1 Like

Thanks for this prompt response sir

Use platform-specific file separator in ProjectBuilder.java by ewpatton · Pull Request #2877 · mit-cml/appinventor-sources (github.com)

I can confirm that this PR fixes the issue on Windows :slightly_smiling_face:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.