Getting an error while creating a custom keyword

I have tried moving the project folder into another folder. but still it is not working.

Test Cases/registration FAILED because (of) org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: com.dynamic.dynamic() is applicable for argument types: (java.lang.String) values: [Ms.]

Possible solutions: dynamic1(java.lang.Object)

my keyword script is:

public class dynamic{

public static String data;

public void dynamic1(data) {

//String url=“url”;

WebDriver driver = DriverFactory.getWebDriver();

driver.findElement(By.xpath(“.//div[text()='”+data+“']”)).click();

}

public static void main(String args)

{

dynamic1(data);

}
}

and i have called the function as:

CustomKeywords.‘com.dynamic.dynamic’(“Ms.”)