Search Unity

Unity 4.2 - Automate export of 'Google Android Project'

Discussion in 'Android' started by AntonStruyk, Aug 8, 2013.

  1. AntonStruyk

    AntonStruyk

    Joined:
    Apr 24, 2012
    Posts:
    3
    We have a build machine setup to generate our distributable executable for our iOS project and I'm trying to extend that to work for our Android builds of the same project. However, in order to build our project we need to do an export of it as a 'Google Android Project' and then do some tweaking of the generated project (to reference some additional external libraries) before doing the build..

    The problem I'm running into is that I can't find a way to trigger the export from our script. Does anyone know if this is possible in Unity 4.2?
     
  2. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
  3. yakandco

    yakandco

    Joined:
    Dec 3, 2014
    Posts:
    90
    This is an old thread but just wanted to post that it's still very relevant. I just spent ages trying to get the buildpipeline to export an android google project but it kept failing when trying to move the files. I've had to use buildoption fix of AcceptExternalModificationsToPlayer.. but the problem is that what if I want it to be a clean export each time. This works for iOS. What happens is that my script creates the export path, then without this build option the buildpipeline function deletes the final folder in the path - which I assume is so that it can force a clean export, but then it fails to move files to a destintion folder that no longer exists. This has to be a bug in the buildpipeline.

    I might have to try force deleting the folder myself but keep this buildoption there just to trick it to work.
     
    LigaomingDev1 and JohnTube like this.
  4. aliaksei_k

    aliaksei_k

    Joined:
    Jul 16, 2021
    Posts:
    1
    It is still useful in 2021 if you want do it in 2019.4.13 LTS and earlier or use
    Code (CSharp):
    1.  EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
    for newer version.