B4A Library ECS/POS printer WIFI print library

hears

Active Member
Licensed User

Attachments

Last edited:

IdasI4A

Member
Licensed User
I'm trying to use your library and when I'm going to run the example it gives me the following error:
--------- beginning of /dev/log/main
** Service (starter) Destroy **
--------- beginning of /dev/log/system
PackageAdded: package:epson.print
Connected to B4A-Bridge (Wifi)
Installing file.
PackageAdded: package:b4a.example
*** Service (starter) Create ***
** Service (starter) Start **
main_globals (B4A line: 20)
End Sub
java.lang.VerifyError: cn/com/zj/zjwfprinter/PrintDemo
at b4a.example.main._globals(main.java:488)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at b4a.example.main.initializeGlobals(main.java:313)
at b4a.example.main.afterFirstLayout(main.java:99)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603)
at dalvik.system.NativeStart.main(Native Method)
Can you help me.
Thank you.
 

hears

Active Member
Licensed User
I'm trying to use your library and when I'm going to run the example it gives me the following error:

Can you help me.
Thank you.

first press connect button,after print.
when i first press print,have same erro.

have you change IP address for your printer ?
 

IdasI4A

Member
Licensed User
first press connect button,after print.
when i first press print,have same erro.

have you change IP address for your printer ?
The error is given before nothing appears on the screen.
The buttons do not appear.
 

hears

Active Member
Licensed User
The error is given before nothing appears on the screen.
The buttons do not appear.
i have tried,here have no erro .maybe because B4A version or IDE setting
sdk i use
android-sdk\platforms\android-22\android.jar
javac i use :
Java\jdk1.8.0_111\bin\javac.exe

my b4a version is 7.8
 

IdasI4A

Member
Licensed User
Thank you very much for your answers.
I was reviewing the paths and the Android version, and discovered that the problem was the Android version.
  • With Android 4.4 the error occurred.
  • With Android 5.1 the buttons appear.
Now I press the "Connect" button and then I press the "PRINT STRING" button and I get the following error:
main_button2_click (B4A line: 62)
pt.printstring("Hola Mundo")
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.net.Socket.isConnected()' on a null object reference
at com.zj.wfsdk.WifiCommunication.sndByte(WifiCommunication.java:88)
at cn.com.zj.zjwfprinter.PrintDemo.printstring(PrintDemo.java:1090)
at b4a.example.main._button2_click(main.java:458)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:935)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:730)
You can keep helping me.
Thank you.
 

hears

Active Member
Licensed User
didn't connect success,
first make sure your andriod device can success PING your printer.
second,the print must be a EPSON chip pos printer

AND have you change the IP address in code, to your printer IP?
 
Top