Ant command - BUILD FAILED - again

Hello Everyone
My ant command is again Failed!

BUILD LOG

Harish@SRIKAR MINGW64 /e/srikar/Funmora_Builder (master)
$ cd appinventor

Harish@SRIKAR MINGW64 /e/srikar/Funmora_Builder/appinventor (master)
$ ant
Buildfile: E:\srikar\Funmora_Builder\appinventor\build.xml

all:

init:

MakeWarLibsDir:

common_CommonUtils:

init:

CommonUtils:

common_CommonVersion:

init:

CommonVersion:

components_CommonConstants:

init:

CommonConstants:

WarLibs:

AiSharedLib:

AiServerLib:

components_AndroidRuntime:

common_CommonVersion:

init:

CommonVersion:

init:

HtmlEntities:

Barcode:

CopyComponentLibraries:

common_CommonUtils:

init:

CommonUtils:

CommonConstants:

AnnotationProcessors:

AndroidRuntime.uptodate:

AndroidRuntime:
    [javac] Compiling 319 source files to E:\srikar\Funmora_Builder\appinventor\components\build\classes\AndroidRuntime
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] Note: Wrote file file:/E:/srikar/Funmora_Builder/appinventor/components/build/classes/AndroidRuntime/simple_components.json
    [javac] Note: Wrote file file:/E:/srikar/Funmora_Builder/appinventor/components/build/classes/AndroidRuntime/simple_components.txt
    [javac] Note: Wrote file file:/E:/srikar/Funmora_Builder/appinventor/components/build/classes/AndroidRuntime/simple_components_build_info.json
    [javac]
    [javac]
    [javac] An annotation processor threw an uncaught exception.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    [javac]     at java.lang.String.charAt(String.java:658)
    [javac]     at com.google.appinventor.components.scripts.ComponentTranslationGenerator.outputCategoryAutogen(ComponentTranslationGenerator.java:215)
    [javac]     at com.google.appinventor.components.scripts.ComponentTranslationGenerator.outputAutogenOdeMessages(ComponentTranslationGenerator.java:330)
    [javac]     at com.google.appinventor.components.scripts.ComponentTranslationGenerator.outputResults(ComponentTranslationGenerator.java:400)
    [javac]     at com.google.appinventor.components.scripts.ComponentProcessor.process(ComponentProcessor.java:1528)
    [javac]     at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
    [javac]     at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
    [javac]     at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
    [javac]     at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
    [javac]     at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:523)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:381)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:370)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:361)
    [javac]     at com.sun.tools.javac.Main.compile(Main.java:56)
    [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:498)
    [javac]     at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:57)
    [javac]     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1388)
    [javac]     at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1117)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
    [javac]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:498)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:350)
    [javac]     at java.util.Vector.forEach(Vector.java:1277)
    [javac]     at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
    [javac]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:498)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:350)
    [javac]     at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
    [javac]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:498)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:350)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:449)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:470)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
    [javac]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
    [javac]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
    [javac]     at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:498)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:350)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:449)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:470)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
    [javac]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
    [javac]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
    [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:498)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:350)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:449)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:470)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
    [javac]     at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
    [javac]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
    [javac]     at org.apache.tools.ant.Main.runBuild(Main.java:818)
    [javac]     at org.apache.tools.ant.Main.startAnt(Main.java:223)
    [javac]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
    [javac]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

BUILD FAILED
E:\srikar\Funmora_Builder\appinventor\build.xml:16: The following error occurred while executing this line:
E:\srikar\Funmora_Builder\appinventor\build-common.xml:341: The following error occurred while executing this line:
E:\srikar\Funmora_Builder\appinventor\components\build.xml:220: The following error occurred while executing this line:
E:\srikar\Funmora_Builder\appinventor\build-common.xml:125: Compile failed; see the compiler error output for details.

Total time: 8 seconds

Please Help Me @MohamedTamer & @ewpatton

Hope Anyone Fixes this error soon

I have already made my Builder about 20%
And now while add a few components I got this error

Thank You :+1:
Regards
@SRIKAR_B.S.S

Try

ant clean

git submodule update --init

ant

2 Likes

But it cleans all my files!

Check components (specially annotations) added by you.

2 Likes

StringIndexOutOfBounds:

Error: The "String index out of range" exception represents that the code is trying to get a character from the string, but the index is greater than the length of the string.

Cause: Index 0 is the first character (indexing starts from 0 in Java), so that means the String it's trying to get is empty.

Possible Solution(s): You probably skipped a step that updates the String. This String seems pretty vital, since the error appears at many places. Try following all the steps, and be patient while doing so.

Hello Everyone
I found the result
Actually in the


I tried to add a new component category, and there I used & in the name of the category
So, that was the error
I even tried to use the ampersand code which is \u0026 but it too didn't work :cry:
So now I removed everything just Word1 Word2 I used space :+1:

1 Like

That is why. Java has specific variable/variable type names reserved for its own purposes. Using a variable named as such, for example, naming an int as Integer, will break your code.
Naming a component as the filename would be disastrous (this comes from experience).

2 Likes

I got another BUILD FAILED

BUILD LOG

Buildfile: E:\srikar\Funmora_Builder\appinventor\build.xml

all:

init:

MakeWarLibsDir:

common_CommonUtils:

init:

CommonUtils:

common_CommonVersion:

init:

CommonVersion:

BUILD FAILED
E:\srikar\Funmora_Builder\appinventor\build.xml:16: The following error occurred while executing this line:
E:\srikar\Funmora_Builder\appinventor\build-common.xml:321: The following error occurred while executing this line:
E:\srikar\Funmora_Builder\appinventor\common\build.xml:99: Execute failed: java.io.IOException: Cannot run program "git" (in directory "E:\srikar\Funmora_Builder\appinventor\common"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at java.lang.Runtime.exec(Runtime.java:621)
        at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:424)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:438)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:660)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:699)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:527)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.Main.runBuild(Main.java:818)
        at org.apache.tools.ant.Main.startAnt(Main.java:223)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:453)
        at java.lang.ProcessImpl.start(ProcessImpl.java:140)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 48 more

Total time: 1 second

When I asked my friend @Aarush_Kumar then he said that it is a problem with Java, and shells can't access it, then I tried java -version

image

I don't know why, but it worked fine until yesterday morning.
The error came from yesterday evening.

The same happened even when I tried to install Appzard Offline.
You can check the conversation here :point_down:

Hope you all solve it soon

Btw one doubt
Should I reinstall Java???

Please help me @MohamedTamer & @ewpatton, I really need your help :pleading_face:

There seems to have been a FileNotFoundException; try running it in another directory maybe?

I even tried in all my 3 back-up folders but the same error came, I even checked again and again. I even checked in any fresh copy but the result was the same, :sob:

Something may be wrong with your instance of Java since there's no reason it should throw an IOException here. It may be prudent to reinstall it.

1 Like

Sure, I will...

OpenJDK 8 is mostly recommended (it's the 2nd most reliable, Java 7 was the first)

1 Like

is OpenJDK 8 and Java JDK 8 same?

Not really. Java used to be free and open-sourced.
Now, since it isn't, people have come up with alternatives. They, unfortunately, have less packages and classes integrated into them.
One such is OpenJDK.

1 Like

I installed Java JDK 8

So far, as I've tested, OpenJDK gives me the most speed when compiling and running a multi-thread class out of all the alternatives.
Java 7 and 8, by comparison, are way faster.

1 Like

See if it works now.

1 Like

I have checked it again, I deleted the old one. and installed it again with the same .exe file. but still the same happened, I think we should install again from the java website
:thinking:
:sob:

You can't get Java anymore, you'll have to buy it -_-

1 Like