BUILD FAILED
C:\workareas\appinventor-sources\appinventor\build.xml:21: The following error occurred while executing this line:
C:\workareas\appinventor-sources\appinventor\buildserver\build.xml:189: Java returned: 1
As the document states it isn’t always up to date with the App Inventor sources. Try following the README. If this error keeps occurring, please provide more information on which step in the document or after which command the build fails.
no changes. I have downloaded the sources using below steps and executed the build.
## 2.2 The App Inventor source code
Note: If you intend to work with the sources and contribute back to the project, instead of cloning the project as explained in this section, you should fork it instead. More information on how to do that in the document: [Developing App Inventor with git and github](https://www.google.com/url?q=https://docs.google.com/document/d/1sAw0QObTxTWqRX7GQRCa2z9TIV2r5AKT9UKMFF1acZI/pub&sa=D&ust=1582441676594000).
The App Inventor source code is available as a Free and Open Source Software that you can download. Once you’ve installed the other software listed in section 3, you can clone a git repository of the source code by running the following git command from a shell:
git clone [https://github.com/mit-cml/appinventor-sources.git](https://www.google.com/url?q=https://github.com/mit-cml/appinventor-sources.git&sa=D&ust=1582441676596000)
This will create a folder named “appinventor-sources” where the sources (and a copy of the repository) will reside. If you have problems with this command, please visit the MIT Center for Mobile Learning github site at [https://github.com/mit-cml](https://www.google.com/url?q=https://github.com/mit-cml&sa=D&ust=1582441676597000).
We’ll refer to this folder throughout the rest of these instructions as the appinventor parent folder. The appinventor parent folder also contains a file called sample-.gitignore. This file should be copied to another file simply named .gitignore which will keep generated files from being added to the git index (note that the file will be hidden in the finder and terminal after renaming. You can view it passing the flag -a to the ls command: ls -al).
Checking out Blockly as a dependency is also needed, and can be done by issuing the following command (from the appinventor-sources folder):
git submodule update --init
If you intend to make changes to the MIT CML’s Blockly fork, please follow instructions in the [Readme file](https://www.google.com/url?q=https://github.com/mit-cml/appinventor-sources%23checkout-dependencies&sa=D&ust=1582441676599000).
## 2.3 App Inventor Dependencies
You will need to install the following items before you build App Inventor. Make sure that the appropriate directories are in your PATH environment variable, otherwise commands in the remainder of this document likely will fail.
* Java Development Kit (JDK) 1.8
* You should be able to run javac -version to get a version number. It should say something along the lines of javac 1.8.0_112 (the first two digits need to match)
* Apache Ant 1.10+
* You should be able to run ant -version to get a version number.
## 2.4 Building App Inventor
As of September 10, 2013 all future development of MIT App Inventor is oriented to App Inventor 2. To that end, the master branch is now the code for App Inventor 2. For a quick guide on the development workflow that the team at MIT follows please look at the [Contributing through github](https://www.google.com/url?q=http://josmas.github.io/contributingToAppInventor2/%23/&sa=D&ust=1582441676601000) slide deck. If you intend to do work on App Inventor 1, the branch ai1 in github is what you are looking for.
With everything set up as above, open your favorite terminal program and navigate to the appinventor-sources parent folder. It contains a subfolder called appinventor, and we’ll refer to this folder as the appinventor folder
Now you can run the command:
$ ant clean
Cleaning isn’t necessary every time you build, but it’s a good idea to clean each time before you build in case some junk has crept into the various build directories. Note again that if you clean, all your projects will go away, so make sure you have copies of the projects before cleaning. Also note that if you clean, the compilation process will take longer (ant builds incremental changes only, but clean deletes all the available packaged projects).
The App Inventor system requires a secret key called the “authkey.” If you change this key, all users will find themselves logged out when you update your service. To make this key persistant, it is store in a directory name “.appinventor” placed in your home directory on your computer, not in the App Inventor sources. If you have never built App Inventor before, you need to create this key. In general you only need to do this once, even if you delete the App Inventor sources and re-download them.
To build this key, do:
$ ant MakeAuthKey
If you forget this step, you will get an error in the next step. If you do, just do the “MakeAuthKey” step and re-do the step below and all should work.
After you’ve cleaned, you can build App Inventor by running the command
$ ant
Building should take several minutes and end with the message BUILD SUCCESSFUL. If something goes wrong, it’s most likely a problem with ant or Java or the App Inventor source.
Done ant clean and rebuilt with ant. It failed again.
PlayApp:
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder build
[java] INFO: temporary project root: C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\android.keystore from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\AI2Companion-Icon.png from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\Instructions.png from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\connectwCode.png from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\connectwQR.png from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\classes.jar from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\component.json from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\components.json from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\extension.properties from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\files\AndroidRuntime.jar from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\files\component_build_info.json from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\external_comps\edu.mit.appinventor.companionextras\files\component_build_infos.json from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\mooning.png from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\assets\splash.html from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\src\edu\mit\appinventor\aicompanion3\Screen1.bky from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\src\edu\mit\appinventor\aicompanion3\Screen1.scm from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\src\edu\mit\appinventor\aicompanion3\Screen1.yail from input zip
[java] Feb 23, 2020 4:30:41 PM com.google.appinventor.buildserver.ProjectBuilder extractProjectFiles
[java] INFO: extracting C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\project.properties from input zip
[java] Component assets needed, n = 2
[java] Component activities needed, n = 3
[java] Libraries needed, n = 34
[java] Native Libraries needed, n = 3
[java] Permissions needed, n = 101
[java] Feb 23, 2020 4:30:42 PM com.google.appinventor.buildserver.Compiler generatePermissions
[java] INFO: usesLocation = False
[java] Feb 23, 2020 4:30:44 PM com.google.appinventor.buildserver.Compiler writeAndroidManifest
[java] INFO: VCode: 12825703
[java] Feb 23, 2020 4:30:44 PM com.google.appinventor.buildserver.Compiler writeAndroidManifest
[java] INFO: VName: 2.57b
[java] Feb 23, 2020 4:30:46 PM com.google.appinventor.buildserver.Execution execute
[java] INFO: ____Executing C:\Users\APPBUI~1\AppData\Local\Temp\aapt9139732976051864360 package -v -f -M C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\..\build\AndroidManifest.xml -S C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\..\build\intermediates\res\merged -A C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\..\build\assets -I C:\Users\APPBUI~1\AppData\Local\Temp\android8097769009845784369.jar -F C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\..\build\deploy\MIT AI2 Companion.ap_ -m -J C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\..\build\generated\src --custom-package edu.mit.appinventor.aicompanion3 --output-text-symbols C:\Users\APPBUI~1\AppData\Local\Temp\1582455641873_0.894836746465636-0\youngandroidproject\..\build\generated\symbols --no-version-vectors
[java] Feb 23, 2020 4:30:49 PM com.google.appinventor.buildserver.Compiler runAaptPackage
[java] WARNING: YAIL compiler - AAPT execution failed.
BUILD FAILED
C:\workareas\appinventor-sources\appinventor\build.xml:21: The following error occurred while executing this line:
C:\workareas\appinventor-sources\appinventor\buildserver\build.xml:189: Java returned: 1
Total time: 4 minutes 6 seconds
Java and Ant Versions:
C:>
C:>java -version
Picked up _JAVA_OPTIONS: -Xmx1024M
java version “1.8.0_191”
Java™ SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot™ 64-Bit Server VM (build 25.191-b12, mixed mode)
C:\>ant -version
Picked up _JAVA_OPTIONS: -Xmx1024M
Apache Ant(TM) version 1.10.7 compiled on September 1 2019
C:\>
hahah… i have multiple accounts on for my gmail… It switched with single signon. Anyway to avoid confusion i have removed the post to avoid confusion. Thanks for catching up
If it’s failing in the AAPT step, try running the aapt.exe file in lib/android/tools/windows. If it doesn’t run, then my guess is that you may be using a 32 bit version of Windows (I think we are only bundling the 64 bit version). Normally when AAPT fails it produces an error message, which I don’t see in your log file.