welcome,
i am on the way to develop a block like this
and i coded
package edu.hifiapps.Mathy;
import com.google.appinventor.components.annotations.;
import com.google.appinventor.components.runtime.;
import com.google.appinventor.components.common.*;
import java.lang.Math;
@DesignerComponent(version = 1, description = "this extension is used to make math easy electrobot999@gmail.com ",
category = ComponentCategory.EXTENSION,
nonVisible = true,
iconName = "https://i.ibb.co/P443L1V/myAvatar.png")
@SimpleObject(external = true)
public class Mathy extends AndroidNonvisibleComponent implements Component{
private ComponentContainer container;
/**
* @param container container, component will be placed in
*/
public Mathy(ComponentContainer container) {
super(container.$form());
this.container = container;
}
@SimpleFunction(description = "")
public void pi() {
//YOUR ACTIVITY HERE
return Math.PI;
}
}
got error
Picked up _JAVA_OPTIONS: -Xmx1024m
Buildfile: C:\Users\GOD\appinventor-sources\appinventor\build.xml
extensions:
clean:
[delete] Deleting directory C:\Users\GOD\appinventor-sources\appinventor\build\components
[delete] Deleting directory C:\Users\GOD\appinventor-sources\appinventor\components\build
[delete] Deleting directory C:\Users\GOD\appinventor-sources\appinventor\components\reports
common_CommonVersion:
init:
CommonVersion:
init:
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\build\components
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build\classes
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\reports
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\reports\raw
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\reports\html
HtmlEntities:
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\HtmlEntities
[javac] Compiling 1 source file to C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\HtmlEntities
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] 1 warning
[jar] Building jar: C:\Users\GOD\appinventor-sources\appinventor\components\build\HtmlEntities.jar
Barcode:
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\Barcode
[javac] Compiling 40 source files to C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\Barcode
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
[jar] Building jar: C:\Users\GOD\appinventor-sources\appinventor\build\components\deps\Barcode.jar
CopyComponentLibraries:
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps\armeabi-v7a
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps\arm64-v8a
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps\x86_64
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 59 files to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 2 files to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
[copy] Copying 1 file to C:\Users\GOD\appinventor-sources\appinventor\build\components\deps
common_CommonUtils:
init:
CommonUtils:
CommonConstants:
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\CommonConstants
[javac] Compiling 7 source files to C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\CommonConstants
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] 1 warning
[javac] Creating empty C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\CommonConstants\com\google\appinventor\components\common\package-info.class
[jar] Building jar: C:\Users\GOD\appinventor-sources\appinventor\build\components\CommonConstants.jar
[jar] Building jar: C:\Users\GOD\appinventor-sources\appinventor\build\components\CommonConstants-gwt.jar
AnnotationProcessors:
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AnnotationProcessors
[javac] Compiling 41 source files to C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AnnotationProcessors
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] Note: C:\Users\GOD\appinventor-sources\appinventor\components\src\com\google\appinventor\components\scripts\ComponentProcessor.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: C:\Users\GOD\appinventor-sources\appinventor\components\src\com\google\appinventor\components\scripts\ComponentProcessor.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
[javac] Creating empty C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AnnotationProcessors\com\google\appinventor\components\annotations\androidmanifest\package-info.class
[javac] Creating empty C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AnnotationProcessors\com\google\appinventor\components\annotations\package-info.class
[javac] Creating empty C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AnnotationProcessors\com\google\appinventor\components\scripts\package-info.class
[copy] Copying 22 files to C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AnnotationProcessors
[jar] Building jar: C:\Users\GOD\appinventor-sources\appinventor\components\build\AnnotationProcessors.jar
AndroidRuntime.uptodate:
AndroidRuntime:
[mkdir] Created dir: C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AndroidRuntime
[javac] Compiling 295 source files to C:\Users\GOD\appinventor-sources\appinventor\components\build\classes\AndroidRuntime
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] warning: In component Mathy, method pi is missing a description.
[javac] Note: Wrote file file:/C:/Users/GOD/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/simple_components.json
[javac] warning: In component Mathy, method pi is missing a description.
[javac] Note: Wrote file file:/C:/Users/GOD/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/simple_components.txt
[javac] Note: Wrote file file:/C:/Users/GOD/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/simple_components_build_info.json
[javac] warning: In component Mathy, method pi is missing a description.
[javac] Note: Wrote file file:/C:/Users/GOD/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/AutogeneratedOdeMessages.java
[javac] Note: Wrote file file:/C:/Users/GOD/appinventor-sources/appinventor/components/build/classes/AndroidRuntime/ComponentsTranslation.java
[javac] warning: In component Mathy, method pi is missing a description.
[javac] C:\Users\GOD\appinventor-
sources\appinventor\components\src\edu\hifiapps\Mathy\Mathy.java:27: error: incompatible types: unexpected return value
[javac] return Math.PI;
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
[javac] 4 warnings
BUILD FAILED
C:\Users\GOD\appinventor-sources\appinventor\build.xml:46: The following error occurred while executing this line:
C:\Users\GOD\appinventor-sources\appinventor\components\build.xml:215: The following error occurred while executing this line:
C:\Users\GOD\appinventor-sources\appinventor\build-common.xml:125: Compile failed; see the compiler error output for details.
Total time: 17 seconds
now i have no idea how to solve please help in code