I am getting an error?

hey, i am getting a error while compiling

    [mkdir] Created dir: C:\Users\dhana\appinventor-sources\appinventor\components\build\classes\AndroidRuntime
    [javac] Compiling 284 source files to C:\Users\dhana\appinventor-sources\appinventor\components\build\classes\AndroidRuntime
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] C:\Users\dhana\appinventor-sources\appinventor\components\src\aryan\gupta\maths\maths.java:34: error: invalid method declaration; return type required
    [javac]     public maths(ComponentContainer container) {
    [javac]            ^
    [javac] 1 error
    [javac] 1 warning

please solve this error.

Can you show code

here is the code where i am getting error.

@UsesServices(services = "example" {
  @ServiceElement(intentFilters = {
    @IntentFilterElement(actionElements = "exampleb" {
      @ActionElement(name = "exampleb")

please help me

The error message says it all:

maths.java:34: error: invalid method declaration; return type required

You haven't specified a return type for the method.

1 Like

but it says the error is coming at here.it means i have to change something in it.
public maths(ComponentContainer container) {

what is the solution ???
please help me

Adding to the information already posted here, here's a link to Oracle's docs on defining methods in Java

  1. The return type—the data type of the value returned by the method, or void if the method does not return a value.