You have to set the path to the root folder, which contains the build.xml.
Hmm.
After Unzipping the Extension Template i got a Folder Named - extension-template-master
Inside that Again a Folder with Same Name - extension-template-master
So, i Removed One of the Folder.
Then Tried ant extensions
in Terminal,
That Removed this Issue -
But Still the Build Failed -
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\addylin\Downloads\extension-template-master> ant extensions
Buildfile: C:\Users\addylin\Downloads\extension-template-master\build.xml
javac:
[javac] Compiling 1 source file to C:\Users\addylin\Downloads\extension-template-master\build\classes
[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:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:3: error: package com.google.appinventor.components.annotations does not exist
[javac] import com.google.appinventor.components.annotations.DesignerComponent;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:4: error: package com.google.appinventor.components.annotations does not exist
[javac] import com.google.appinventor.components.annotations.SimpleObject;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:5: error: package com.google.appinventor.components.annotations does not exist
[javac] import com.google.appinventor.components.annotations.SimpleFunction;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:6: error: package com.google.appinventor.components.annotations does not exist
[javac] import com.google.appinventor.components.annotations.SimpleEvent;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:7: error: package com.google.appinventor.components.annotations does not exist
[javac] import com.google.appinventor.components.annotations.SimpleProperty;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:8: error: package com.google.appinventor.components.common does not exist
[javac] import com.google.appinventor.components.common.ComponentCategory;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:9: error: package com.google.appinventor.components.runtime does not exist
[javac] import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:10: error: package com.google.appinventor.components.runtime does not exist
[javac] import com.google.appinventor.components.runtime.AndroidViewComponent;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:11: error: package com.google.appinventor.components.runtime does not exist
[javac] import com.google.appinventor.components.runtime.ComponentContainer;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:12: error: package com.google.appinventor.components.runtime does not exist
[javac] import com.google.appinventor.components.runtime.EventDispatcher;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:14: error: package android.graphics does not exist
[javac] import android.graphics.Color;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:15: error: package android.graphics.drawable does not exist
[javac] import android.graphics.drawable.GradientDrawable;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:16: error: package android.view does not exist
[javac] import android.view.View;
[javac] ^
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:26: error: cannot find symbol
[javac] public class Gradient extends AndroidNonvisibleComponent {
[javac] ^
[javac] symbol: class AndroidNonvisibleComponent
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:18: error: cannot find symbol
[javac] @DesignerComponent(version = 1,
[javac] ^
[javac] symbol: class DesignerComponent
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:24: error: cannot find symbol
[javac] @SimpleObject(external = true)
[javac] ^
[javac] symbol: class SimpleObject
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:28: error: cannot find symbol
[javac] public Gradient(ComponentContainer container) {
[javac] ^
[javac] symbol: class ComponentContainer
[javac] location: class Gradient
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:33: error: cannot find symbol
[javac] public void SetGradientBackground(AndroidViewComponent component, Object orientation, int color1, int color2) {
[javac] ^
[javac] symbol: class AndroidViewComponent
[javac] location: class Gradient
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:19: error: cannot find symbol
[javac] category = ComponentCategory.EXTENSION,
[javac] ^
[javac] symbol: variable ComponentCategory
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:32: error: cannot find symbol
[javac] @SimpleFunction(description = "")
[javac] ^
[javac] symbol: class SimpleFunction
[javac] location: class Gradient
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:43: error: cannot find symbol
[javac] View view = component.getView();
[javac] ^
[javac] symbol: class View
[javac] location: class Gradient
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:48: error: cannot find symbol
[javac] GradientDrawable gradientDrawable = new GradientDrawable(
[javac] ^
[javac] symbol: class GradientDrawable
[javac] location: class Gradient
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:48: error: cannot find symbol
[javac] GradientDrawable gradientDrawable = new GradientDrawable(
[javac] ^
[javac] symbol: class GradientDrawable
[javac] location: class Gradient
[javac] C:\Users\addylin\Downloads\extension-template-master\src\com\extensions\gradient\Gradient.java:49: error: package GradientDrawable does not exist
[javac] (GradientDrawable.Orientation) orientation,
[javac] ^
[javac] 24 errors
[javac] 4 warnings
BUILD FAILED
C:\Users\addylin\Downloads\extension-template-master\build.xml:29: Compile failed; see the compiler error output for details.
Total time: 2 seconds
And What About Those 24 Errors Watermelon.
You are missing some libraries, run this command:
git submodule update --init
To download these libraries
i Already Read the Posts Above and Headed to AI
And Successfully Ended to -
But Still it Shows these 24 Errors.
hello @Mohamed_Tamer I have four variable in appybuilder code editor how can i join them all in one variable
Those errors means that you are missing some libraries while compiling, for instance the Android and the app Inventor libraries.Git submodule command should solve this , maybe you can also try cloning the repository instead of downloading it , as described in the Extension template readme.md:
P.S: my-extension is the directory the extension template would be cloned at.
If you mean you want to join string variables together, you can use the +
operator, which works as the join block if your variable type is string:
String hello = "some text";
String myVariable = "Some other text";
String result = hello + myVariable; // joins the two strings, the result would be: "some textSome other text"
if I have to add some text between it like this after some text
i want to text here some other text
This doesn’t related to this topic nor Kodular. Please ask somewhere else.
Thanks @Mohamed_Tamer and @WatermelonIce for all your Time and Help.
i Started the git part Again and this Time i was Successful - No 24 Errors this Time.
But i am Getting 1 + 23 New Errors.
This post was flagged by the community and is temporarily hidden.
Update 14 March 2021
With the launch of Rush, which is improved tooling for building extensions, the two articles in first post are now outdated. To know more about what Rush is and how to use it, check out this post.
Rush gets blocked by Mcafee.
Rush is not a malware. To prevent it from being blocked, simply exclude rush.exe
it from being scanned. Also, do read the following
Thank you
Replying for other user.
String a = “how”;
String c = “you”;
String result = a + “are” + c;
return result;
thank you but i think i cant make a extension. i think it too difficult
how to create this block?
@SimpleFunction
public boolean IsBla(String param){
return true;
}
ok, thanks you
Look at this