Library Help Please

giga

Well-Known Member
Licensed User
Longtime User
I am working on a new SIP library and keep getting an error with this code.
It is JAVA and maybe someone has seen this before.

}
public String toString(int arg0){
return this.siperrorcode.toString(int arg0)
}

error: unexpected type required:value found class

Any help appreciated As always.

THANKS,
 
Thanks agraham for the reply. This is the entire .java class
The error occurs on the last line. "public String"

package android.net.sip.sipErrorCode;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;
import android.net.sip.*;

@ShortName("SipErrorCode")
@Author("giga")
@Version(1.0f)
@DependsOn(values = { "android-9" })

public class SipErrorCode {

private BA ba;
private String eventName;
private SipErrorCode siperrorcode;

public void Initialize(final BA ba, String EventName) {
this.ba = ba;
this.eventName = EventName.toLowerCase(BA.cul);
this.siperrorcode = new SipErrorCode();
}

public SipErrorCode getSipErrorCode() {
return this.siperrorcode;
}

public void setSipErrorCode(SipErrorCode siperrorcode) {
this.siperrorcode = siperrorcode;
}

public String toString(int arg0){
return this.siperrorcode.toString(int arg0)
}


}
 
Upvote 0
I don't understand that error you are getting, I get a "syntax error"

Yes I know, its strange. I am using eclipse Build: v21.0.1-543035 and i wonder if it is an eclipse bug??

I show int as red underline and the brackett after arg0 ) is also underlined.(int arg0)

Thanks,
 
Upvote 0
If it compiles it's correct. But it might not be what you intend!

By the way you don't need that @DependsOn annotation. It is only needed for "foreign" jars not known to Basic4android that your library depends on and that are located in your additional libraries folder.
 
Last edited:
Upvote 0
Back
Top