Rush - cannot find symbol │@SimpleEvent()

okey fixed

i add these libs

import com.google.appinventor.components.runtime.EventDispatcher;
import com.google.appinventor.components.annotations.SimpleFunction;

Screenshot_1

package com.ruwis.denemeext;

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 DenemeExt extends AndroidNonvisibleComponent {

  public DenemeExt(ComponentContainer container) {
    super(container.$form());
  }
  
  
  @SimpleEvent()
  public void SonucGeldi(String deger) {
	  EventDispatcher.dispatchEvent(this, "SonucGeldi", deger);
  }


  @SimpleFunction()
  public void Calistir() {
    String yazi = "Ruwis";
	SonucGeldi(yazi);
  }
}

Try adding:

import com.google.appinventor.components.annotations.SimpleEvent;

to your imports…

3 Likes

You have to add also:

import com.google.appinventor.components.runtime.EventDispatcher;

2 Likes