How can I solve the error build failed

AndroidRuntime.uptodate:

AndroidRuntime:
[mkdir] Created dir: C:\ai\appinventor-sources-master\appinventor\components\build\classes\AndroidRuntime
[javac] Compiling 1795 source files to C:\ai\appinventor-sources-master\appinventor\components\build\classes\AndroidRuntime
[javac] warning: [options] bootstrap class path not set in conjunction with -source 7
[javac] warning: [options] source value 7 is obsolete and will be removed in a future release
[javac] warning: [options] target value 7 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] C:\ai\appinventor-sources-master\appinventor\components\src\com\google\appinventor\components\runtime\com\google\android\gms\common\internal\zzv.java:109: error: illegal start of expression
[javac] ? r0 = 0;
[javac] ^
[javac] C:\ai\appinventor-sources-master\appinventor\components\src\com\google\appinventor\components\runtime\com\google\android\gms\common\internal\zzv.java:109: error: : expected
[javac] ? r0 = 0;
[javac] ^
[javac] C:\ai\appinventor-sources-master\appinventor\components\src\com\google\appinventor\components\runtime\com\google\android\gms\common\util\zzt.java:23: error: illegal start of expression
[javac] ? r1;
[javac] ^
[javac] C:\ai\appinventor-sources-master\appinventor\components\src\com\google\appinventor\components\runtime\com\google\android\gms\common\util\zzt.java:23: error: : expected
[javac] ? r1;
[javac] ^
[javac] C:\ai\appinventor-sources-master\appinventor\components\src\com\google\appinventor\components\runtime\com\google\android\gms\common\util\zzt.java:25: error: illegal start of expression
[javac] ? r12;
[javac] ^
[javac] C:\ai\appinventor-sources-master\appinventor\components\src\com\google\appinventor\components\runtime\com\google\android\gms\common\util\zzt.java:25: error: : expected
[javac] ? r12;
[javac] ^
[javac] 6 errors
[javac] 4 warnings

BUILD FAILED
C:\ai\appinventor-sources-master\appinventor\build.xml:46: The following error occurred while executing this line:
C:\ai\appinventor-sources-master\appinventor\components\build.xml:215: The following error occurred while executing this line:
C:\ai\appinventor-sources-master\appinventor\build-common.xml:125: Compile failed; see the compiler error output for details.

Total time: 12 seconds

You might want to show your code?Also see here:

Have you added any special characters in your java code, what's your file encoding?
Or those are normal ?.

1 Like

This error is a compile time error when the compiler encounters an inappropriate statement in the source code. This error can be encountered in various scenarios . Illegal start of expression can be encountered in various scenarios. The following are the most common errors:

  • Missing an opening or closing curly bracket for a code block
  • Declaring a function inside another function
  • Using an access specifier with a function's local variable
  • String Character Without Double Quote

To debug this error, try looking at the lines preceding the error message for missing brackets, curly braces or semicolons and check the syntax.