Unable to compile source for android

I was testing out .com/googlevr-unreal/UnrealEngine/tree/4.13-googlevr and kept getting a build fail for android that made me think I needed to re-install the android SDK. So I uninstalled the old AndroidWorks and the newer CodeWorksforAndroid I had installed.

I then installed: CodeWorksforAndroid-1R4-windows.exe from the \Epic Games\4.13\Engine\Extras\AndroidWorks\Win64 directory using default settings.

Now whenever I try to compile any source code engine (eg: .com/EpicGames/UnrealEngine/tree/4.13 ) I no longer see an Android option for the Solution Platform at all :frowning: I tried uninstalling and reinstalling CodeWorksForAndroid multiple times always restarting the PC inbetween. Even tried opening the engine source in both Visual Studio Community 2015 & 2013 but both VS’s don’t show Android anymore:

108736-solution_platform.png

I can see the environment variables are set correctly:

108737-environment_variables.png

any help / advise for what I’m missing much appreciated as it worked fine before I uninstalled and reinstalled CodeWorksforAndroid-1R4-windows

Hello aussieburger,

I have a few questions for you:

  1. When you reinstalled CodeWorksforAndroid-1R4-windows.exe, which engine directory was this from? Was this from the google VR fork you used, a source build you downloaded, or from the binary build?
  2. You mention that you don’t see the Android configuration when using a source version of the engine. What about when you use a Binary build? Just to add, I noticed that you’re also missing iOS and TVOS which is unusual.
  3. Have you tried restarting your computer since doing these uninstall/reinstalls? I recall codeworks being one of those ones that acts odd until you’ve restarted.
  4. Can you the following? Click the configuration dropdown, select “Configuration Manager”, click the dropdown below “Active Solution Platforms”, click “New” and see if Android is listed in the “Type or select the new platforms” list?

Edit: Forgot that putting something withing < and > causes it to be treated as html code and disappear.

Hi Matthew thank you for your feedback,

Here are my answers:

  1. First time it was from the google vr fork, but I also tried the one from the 4.13 binary build. I did not try the one from the 4.13 source build download
  2. Now when trying to package my project for android using a binary build I get the message: “You are missing some required components for Android game creation. Even if you have installed the Android SDK already, there may be some missing components or environment variables” So I can no longer export for android in any UE4 build :frowning:
  3. Yeah I restarted after every uninstall and every install to ensure the environment variables are set correctly.
  4. Android is unfortunately not there either:

108779-active_solution_platforms.png

So it appears the default install for CodeWorksforAndroid-1R4-windows.exe is missing something?

I may of just noticed the issue. Looking at this tutorial, it seems that you need to run Setup.bat one more time after you have installed the SDK and restarted your computer to download the development files for Android. Have you done this? Otherwise, can you make sure that you followed every step in this tutorial?

Hi Matthew yeah I had done that - however I just found an additional step that makes android appear again:
After running setup.bat you also need to run GenerateProjectFiles.bat again - probably because I had run that file before I ran setup.bat the second time.

So all good but I had one additional question about the CodeWorksforAndroid-1R4-windows.exe install there is a new version which I did not install since the link above says to install r4u2 - but you can see from this screenshot there is now a r5. Is it correct we should not install that latest one? (If so that might have been the reason why it was not coming up in the binary since I uninstalled the r5 and installed the r4 just now)

Also since that is now the default I guess users should be warned?

108808-codeworks_version.png

Yes, you need to run GenerateProjectFiles.bat after setup.bat. As for 1R5; it should work fine with 4.13.

Hi Chris - I’m trying to compile with 1R5 however I get the problem above where there is no android to compile for. I tried running setup.bat and generateprojectfile.bat after installing 1R5 (over 1R4u2). FYI: I’m trying to compile: .com/googlevr-unreal/UnrealEngine/tree/4.13-googlevr

EDIT: ignore this comment - but there was one additional step I needed to do before it worked after attempted all the steps many times - I needed to plugin in my android device first after installing code works - go figure!

Just in case anyone suffer from the same problem, when android isn’t showing even after downloading android part from github and you already have androids sdk ndsk etc… installed, to fix this issue easily just open \android-sdk-windows\tools\android.bat and install a new version of android SDK build tool or reinstall it, lets say you got 26.0.1 then install 26.0.2 and then open sln and you will find android section appearance.