Need Help in creating Extension

i tried to compile simple math.java
got the following error

Buildfile: D:\appinventor\components\build.xml

init:

CommonConstants:

HtmlEntities:

common_CommonVersion:

init:

CommonVersion:
[exec] Result: 128
[exec] Result: 128

AndroidRuntime:
[javac] Compiling 221 source files to D:\appinventor\components\build\classes\AndroidRuntime
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] D:\appinventor\components\src\com\makeroid\Simplemaths.java:22: error: invalid method declaration; return type required
[javac] public SimpleExtension(ComponentContainer container) {
[javac] ^
[javac] 1 error
[javac] 4 warnings

BUILD FAILED
D:\appinventor\components\build.xml:124: The following error occurred while executing this line:
D:\appinventor\build-common.xml:118: Compile failed; see the compiler error output for details.

Total time: 1 second

Change SimpleExtension to SimpleMaths. I’ll correct it on docs later.

1 Like

Also the filename should match the class name.

1 Like

Thanks @pavi2410 :grinning: