Add components in ai2 offline pls help me link of ai2 offline

i have components of java & class file like MockChronometer.class..., and i want to add in ai2 offline

so how can i add & where to edit pls help me

you can not add a .class file into the source code.

first of all, if you want to add a new component please use the latest MIT App Inventor source code from GitHub.

for that you need

  1. Java Version - 1.8.x
    for checking the version java -version
  2. Apache Ant
    for checking the version ant -version
  3. Git version controller so that you can update your source code with the latest MIT App Inventor source code.
    for checking the version git --version
  4. Cloud SDK

for installations
follow these commands

  1. git clone
  2. cd appinventor-sources
  3. git remote add upstream
  4. git submodule update --init
  5. cd appinventor
  6. ant MakeAuthKey
  7. ant

these commands build your local copy of its app inventor please wait because the building process depends on your system.

  1. cd appinventor/buildserver
  2. ant RunLocalBuildServer

now open a new instance of your CMD or git terminal and run the following command

  1. your-google-cloud-SDK-folder/bin/ --port=8888 --address= appengine/build/war/

You should now be up and running; you can test this by pointing your browser to: http://localhost:8888


  1. please don't use space into folder name this will break the building process.

For more information you can search

also fell free to ask question.

1 Like

this error is coming im trying from 3 weeks pls help me

Capture2 Capture1

This are my setting i have seen in manual

Hello Shivaprasad, You are missing the Appinventor blockly submodules, you should run:
git submodule update --init
See also the installation guide here:

P.S: why are your folder name is kodular. This might suggest that you are copying it.

im not coping kodular i save my aia in kodular folder ,

in that kodular folder i saved appinventor-sources

1 Like

i have tried buy this error comes, can u help on anydisk pls

Looks like you have downloaded the Appinventor repository instead of cloning it, and therefore, you will not be able to download the submodules.
You should try again by following this guide:

git init
git remote add upstream

then try
git submodule update --init

Ok done I have changed _JAVA_OPTIONS -Xmx1052M to. -Xmx2048M

Now tell me how to add new comment on app inventor offline

If you want to add components then please navigate to

and paste your java file there.
Then recompile & redeploy.

Component not added

I have added package;

1st I add java file in components/run

2nd And cd appinventor-sources\appinventor\ ant

Build successful .....

3rd I have restarted sever again....

I can't see that component what I have added

@SimpleObject annotation must be external = false

can you please share your code ?

// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the MIT License



import android.util.Log;
import android.view.View;

import android.widget.LinearLayout;

 * Component for displaying images and animations.
@DesignerComponent(version = YaVersion.IMAGE_COMPONENT_VERSION,
    category = ComponentCategory.BASIC,
    description = "Component for displaying images.  The picture to display, " +
    "and other aspects of the Image's appearance, can be specified in the " +
    "Designer or in the Blocks Editor.")
@UsesPermissions(permissionNames = "android.permission.INTERNET, android.permission.ACCESS_NETWORK_STATE")
@UsesLibraries(libraries = "admob.jar")
public final class AdMob extends AndroidViewComponent {
  private final LinearLayout superview;
  private AdView view;
  @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "")
  public void ID(String ID) { 
  //     view = new AdView(container.$context(), AdSize.BANNER, ID);
		view = new AdView(container.$context());
       //view.loadAd(new AdRequest());
 @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "")
  public void Size(String SIZE) { 
       //view.loadAd(new AdRequest());
       AdRequest adRequest = new AdRequest.Builder().build();

   // Start loading the ad in the background.
   * Creates a new AdMob component.
   * @param container  container, component will be placed in
  public AdMob(ComponentContainer container) {
    //view = new AdView(container.$context(), AdSize.BANNER, "a195766848864512");
	superview = new LinearLayout(container.$context());
    // Adds the component to its designated container
	//view.loadAd(new AdRequest());

  public View getView() {
    return superview;

formatted by Taifun and the preformatted text option

BASIC component category I think not present in app inventor.
Have you added into system?

2nd thing I want to tell you this is visible component so that you need to mention into @DesignerComponent annotations.

If this is visible component then you need to create mock component for that into appengine folder

Please follow this guidelines for adding new component into MIT app inventor

Read this guidelines carefully if you find any problem then please feel free to ask.