I noticed that many people were facing issues in building appinventor in windows.
So I am writing this guide to help install AI2 Sources.
First to make sure
You don't have java --version
more than 8
Installations:
WIndows
- Download and Install java
- Download Ant from its website.
https://apachemirror.wuchna.com//ant/binaries/apache-ant-1.10.10-bin.zip
-
Next we need to install it with its wizard.
-
Then we need to install Google Cloud SDK.
-
Open PowerShell and run --
(New-Object Net.WebClient).DownloadFile("https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe", "$env:Temp\GoogleCloudSDKInstaller.exe")
& $env:Temp\GoogleCloudSDKInstaller.exe
- Go though the installation wizard.
Downloading and compiling AI2 Sources--
Run the following command in your terminal:
- git clone https://github.com/mit-cml/appinventor-sources
- git submodule update --init
- cd appinventor/
ant MakeAuthKey
ant noplay
(the noplay argument prevents the building of aiplay app which is known as the companion. Its optional)java_dev_appserver --port=8888 --address=0.0.0.0 appengine/build/war/
- Now open another command prompt
cd appinventor/buildserver/
ant RunLocalBuildServer
- Your Appinventor instance is ready in http://localhost:8888
If this gives error like...
BUILD FAILED
C:\appinventor-sources\appinventor\build.xml:50: The following error occurred while executing this line:
C:\appinventor-sources\appinventor\appengine\build.xml:173: Warning: Could not find file C:\appinventor-sources\appinventor\build\blocklyeditor\blockly-all.js to copy.
Its probably because of your antivirus software...
Try whitelisting the appinventor directory to the antivirus program.
If this issue persists then try to run
ant
instead of ant noplay
Linux
Installation:
-
sudo apt update
(Updates your software repos) -
sudo apt-get install openjdk-8-jdk openjdk-8-doc openjdk-8-jre-lib
(Installs Java 8) -
sudo apt install ant
(Installs Ant) -
apt-get install google-cloud-sdk
(Install Google Cloud Platform SDK) -
sudo apt-get install google-cloud-sdk-app-engine-java
(Installs components for the sdk)
Run the following commands:
- git clone https://github.com/mit-cml/appinventor-sources
- git submodule update --init
- cd appinventor/
ant MakeAuthKey
ant noplay
(the noplay argument prevents the building of aiplay app which is known as the companion. Its optional)java_dev_appserver.sh --port=8888 --address=0.0.0.0 appengine/build/war/
- Now open another command prompt
cd appinventor/buildserver/
ant RunLocalBuildServer
- Your Appinventor instance is ready in http://localhost:8888
FAQ
- Running --
java_dev_appserver --port=8888 --address=0.0.0.0 appengine/build/war/
fails.
Ans) Try running gcloud components install app-engine-java
. If this fails then try installing python 2.7
java_dev_appserver
command not found
Ans) Make sure Google Cloud SDK is added to path. For example
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin
Any problems? Post it here make sure to post the error log along with it :)
It doesn't work in git bash unless you add .cmd
or .sh
to the command
Make sure to leave a