Git Fatal Error While Compiling with ant

Hi, I was trying to compile my modified version of appinventor, I tried to compile in other computer (rpi), it works, but in my pc, this error is showing please help, log below

$ ant
Buildfile: C:\Users\Croma\downloads\Apppro-builder\appinventor\build.xml

all:

init:

MakeWarLibsDir:

common_CommonUtils:

init:

CommonUtils:

common_CommonVersion:

init:

CommonVersion:
     [exec] Result: 128
    [javac] Compiling 3 source files to C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\classes\CommonVersion
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:17: error: unclosed string literal
    [javac]   public static final String GIT_BUILD_VERSION = "fatal: No tags can describe 'b7a294388d211addcb282b9a82bee8788c2becd4'.
    [javac]                                                  ^
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:18: error: <identifier> expected
    [javac] Try --always, or create some tags.";
    [javac]    ^
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:18: error: <identifier> expected
    [javac] Try --always, or create some tags.";
    [javac]             ^
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:18: error: ';' expected
    [javac] Try --always, or create some tags.";
    [javac]                 ^
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:18: error: ';' expected
    [javac] Try --always, or create some tags.";
    [javac]                             ^
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:18: error: unclosed string literal
    [javac] Try --always, or create some tags.";
    [javac]                                   ^
    [javac] C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build\src\com\google\appinventor\common\version\GitBuildId.java:18: error: ';' expected
    [javac] Try --always, or create some tags.";
    [javac]                                     ^
    [javac] 7 errors
    [javac] 1 warning

BUILD FAILED
C:\Users\Croma\downloads\Apppro-builder\appinventor\build.xml:16: The following error occurred while executing this line:
C:\Users\Croma\downloads\Apppro-builder\appinventor\build-common.xml:312: The following error occurred while executing this line:
C:\Users\Croma\downloads\Apppro-builder\appinventor\common\build.xml:118: The following error occurred while executing this line:
C:\Users\Croma\downloads\Apppro-builder\appinventor\build-common.xml:125: Compile failed; see the compiler error output for details.

Total time: 1 second

It seems like you're not running this from within a git repository. When you build from a clean slate the build process runs git to generate a version identifier from the git repo. This error occurs when you're not running from a git repository since there isn't any git history to draw from.

1 Like

I just ran things as usual, below is how I ran the commands

 git clone
 cd Apppro-builder
 cd appinventor
 ant MakeAuthKey
 ant

I don't find something wrong here

I even find the .git dir in the cloned sources

Run ant noplay.

Tried that too, anyway it just prevents generating the companion app, so no relation with ant build directly.

1 Like

It sounds like you repo doesn't contain any of the tags from our repo. Try creating a tag based on your master branch then run ant clean to get rid of the corrupt build info.