Error during compiling my extension

you mean Java SDK version 8?

Jdk version 1.0.8


Ok I did that but skill it say that.

Now, the issue is in your rush.yml file. Check the value of the authors key. You might provide a screenshot.

@JEWEL
Ok where do i get that(authors key) I use intellij to edit my code?

It cannot be empty. Write your name here like below:

authors:
  - Solomon Zerihun

@JEWEL
Ok I correct it but this happened.

There is no error log, you might show your source code if possible. So I can help you better.

this is the code i use.

package com.io.myexo;

import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.runtime.errors.YailRuntimeError;
import com.google.appinventor.components.runtime.util.YailList;

public class Myexo extends AndroidNonvisibleComponent {

  public Myexo(ComponentContainer container) {
    super(container.$form());
  }

  @SimpleFunction
  public int add(int num1, int num2)
  {
    return num1 + num2;
  }
  @SimpleFunction
  public int add(int num1, int num2)
  {
    return num1 - num2;
  }
  @SimpleFunction
  public int add(int num1, int num2)
  {
    return num1 * num2;
  }
  @SimpleFunction
  public int add(int num1, int num2)
  {
    return num1 / num2;
  }
}

You can’t use same name for every method, only one is allowed. Try the below code:

package com.io.myexo;

import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.runtime.errors.YailRuntimeError;
import com.google.appinventor.components.runtime.util.YailList;

public class Myexo extends AndroidNonvisibleComponent {

  public Myexo(ComponentContainer container) {
    super(container.$form());
  }

  @SimpleFunction
  public int Add(int num1, int num2)
  {
    return num1 + num2;
  }

  @SimpleFunction
  public int Sub(int num1, int num2)
  {
    return num1 - num2;
  }

  @SimpleFunction
  public int Multi(int num1, int num2)
  {
    return (int) num1 * num2;
  }

  @SimpleFunction
  public int Divide(int num1, int num2)
  {
    return (int) num1 / num2;
  }
}

Sorry @JEWEL I made it correct before send it to you, but still the same.
this is happen on my editor.

You have selected jre not jdk

@devxlabs that is what the problem, jdk-1.8 is renamed from jre. when java installed it has jre file only.

above jre you have jdk 1.8 folder also

But Wait! Why are you adding jdk as Kotlin SDK ClassPath

i can delete that. the jdk folder in not the part of installed file, even those it warn me the same for both.

guys, surprisingly I solve it! thanks all. use this link to download jdk-8u421-windows-x64.exe
https://www.oracle.com/java/technologies/downloads/#java8-windows

Also please check the naming conventions

Taifun

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.