How to create an Extension

Can Anyone Please Set Up My PC For Creating App Inventor I have Downloaded All Required Files But I Am Not Able To Set Variables

This post was flagged by the community and is temporarily hidden.

Which User Or System

1 Like

System variables

And This User Or System ?

Already told!

Read the first guide…

I Have Readed Many Times But Unable To Set Up

Me too
Before JAVA was installed
While installing ANT Apache
Something might have happened

‘java’ is not recognized as an internal or external command,
operable program or batch file.

It will be awesome
If Appy Builder Code Editor support third party libraries

Can anyone give me some basics extension Ideas for beginners ?

I Have Set Variable And Still I Am Getting Error Please Check it Out And Point Me On My Mistake

image


image


image


Path
image

Error Is
PS D:\appinventor-sources-master\appinventor> ant extensions
Buildfile: D:\appinventor-sources-master\appinventor\build.xml

extensions:

clean:

common_CommonVersion:

init:

CommonVersion:

BUILD FAILED
D:\appinventor-sources-master\appinventor\build.xml:46: The following error occurred while executing this line:
D:\appinventor-sources-master\appinventor\build-common.xml:304: The following error occurred while executing this line:
D:\appinventor-sources-master\appinventor\common\build.xml:99: Execute failed: java.io.IOException: Cannot run program "git" (in directory "D:\appinventor-sources-master\appinventor\common"): CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
        at java.base/java.lang.Runtime.exec(Runtime.java:590)
        at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:630)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:671)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:497)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:352)
        at org.apache.tools.ant.Target.execute(Target.java:437)
        at org.apache.tools.ant.Target.performTasks(Target.java:458)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1406)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1261)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:352)
        at org.apache.tools.ant.Target.execute(Target.java:437)
        at org.apache.tools.ant.Target.performTasks(Target.java:458)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1406)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1261)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:352)
        at org.apache.tools.ant.Target.execute(Target.java:437)
        at org.apache.tools.ant.Target.performTasks(Target.java:458)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1406)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1377)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1261)
        at org.apache.tools.ant.Main.runBuild(Main.java:857)
        at org.apache.tools.ant.Main.startAnt(Main.java:236)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:483)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
        ... 48 more

Total time: 1 second
PS D:\appinventor-sources-master\appinventor>

image


image

Update : Now It’s Working Fine After Installing Gitbash

@Srrazmi

you can try extension-template:

2 Likes

I followed this tutorial and it worked 100% on the first try.

4 Likes

Is there any tutorial availabe on youtube or any other platform ?

Mostly Everything you will need to know is already mentioned in this topic. Don’t be lazy and just read the whole posts​:wink:

2 Likes

I think we can better understand by video not by just text

wonderful tutorial great

1 Like

I Am Just Trying To Create Simple Listview But I Am Not Success Please Help Me

My Java Code
    package com.srrazmi.List;

     import android.content.Context;
import com.google.appinventor.components.common.ComponentCategory;
 import com.google.appinventor.components.annotations.*;
import com.google.appinventor.components.runtime.*;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.google.appinventor.components.common.YaVersion;
import com.google.appinventor.components.runtime.util.ElementsUtil;
import com.google.appinventor.components.runtime.util.YailList;


    @DesignerComponent(version = 1,  description = "Simple Extension For List",
            category = ComponentCategory.EXTENSION,
            nonVisible = true,   iconName = "http://appyBuilder.com/extensions/icons/extension.png")
    @SimpleObject(external = true)
    public class List extends AndroidNonvisibleComponent {
        private ComponentContainer container;
        private Context context; //Added
        private Activity activity; //Added
        /**
         * @param container container, component will be placed in
         */
        public List(ComponentContainer container) {
            super(container.$form());
            this.container = container;
            context = (Context) container.$context(); //Added
           
        }
      

    @SimpleFunction(description = "Simple ListView For Learning ")
      public void MakeList(YailList list , AndroidViewComponent arragment) {
           View view = arragment.getView();
        adapter = new ArrayAdapter<Spannable>(container.$context(), android.R.layout.simple_list_item_1,
            list);
        view.setAdapter(adapter);

       
      }

    }

Don’t Suggest Me That List view Is Already Available , Because I Am Just Trying To Learn