Fail to compile Android from Git source 4.9 branch

Config Detail:

  • 4.9 git release branch fail to compile Development:Android
  • AndroidWork1R1 VS2013 Win7 & Win10
  • I tried to delete {HOME}/.android folder, still have
    compile error.
  • But I can
    successfully build and deploy 4.7 & 4.8 android ES2&ES3.1

ERROR detail:

C:/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/…/…/…/…/arm-linux-androideabi/bin\ld.gold.exe : error : cannot find -lcxa_demangle
1>C:/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/…/…/…/…/arm-linux-androideabi/bin\ld.gold.exe : error : cannot find -lvrapi
1>C:/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/…/…/…/…/arm-linux-androideabi/bin\ld.gold.exe : error : cannot find -licudata
.
.
. {similar error skiped}
.
.
1>C:/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/…/…/…/…/arm-linux-androideabi/bin\ld.gold.exe : error : cannot find -lvorbisfile
1>C:/NVPACK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/…/…/…/…/arm-linux-androideabi/bin\ld.gold.exe : error : cannot find -lgpg

I finally fixed it by doing the follow step:

  1. redo git checkout branch 4.9
  2. delete Intermediate & DerivedDataCache folder
  3. Uninstall UnrealVS extension for VS2013
  4. re-run setup.bat / generateprojectfile.bat
  5. now successfully build Android/Development.

Have no idea which step fixed it.

I’m on Mac and solved this by making sure Setup.command calls Setup.sh with the “–all” parameter. I think on Windows you can just pass in the --all param to Setup.bat. Run “Setup.bat --help” to see available params.