irpankusuma / SUNMI_AIDL_PRINTER

Other
10 stars 17 forks source link

Issue integrating with my project #1

Open halahmadi opened 4 years ago

halahmadi commented 4 years ago

I tried to use this code by adding to pubspec.yaml like below: dependencies: sunmi_aidl_print: git: url: https://github.com/irpankusuma/SUNMI_AIDL_PRINTER.git

But I get the following error: ` C:\apps\SUNMI_AIDL_PRINTER\personal_test\build\sunmi_aidl_print\generated\aidl_source_output_dir\debug\compileDebugAidl\out\woyou\ai dlservice\jiuiv5\IWoyouService.java:285: error: reached end of file while parsing data. ^ C:\apps\SUNMI_AIDL_PRINTER\personal_test\build\sunmi_aidl_print\generated\aidl_source_output_dir\debug\compileDebugAidl\out\woyou\ai dlservice\jiuiv5\IWoyouService.java:285: error: not a statement data. ^ C:\apps\SUNMI_AIDL_PRINTER\personal_test\build\sunmi_aidl_print\generated\aidl_source_output_dir\debug\compileDebugAidl\out\woyou\ai dlservice\jiuiv5\IWoyouService.java:286: error: reached end of file while parsing 3 errors

FAILURE: Build failed with an exception.

ArjunNagraj commented 3 years ago

Same issue...any update on this?

halahmadi commented 3 years ago

Hi @ArjunNagraj ,

Yes, the issue here is that plugin doesn't end its methods; there is no callback, so the code gets stuck there. The way to fix this problem to modify this file SUNMI_AIDL_PRINTER/android/src/main/java/asriworks/com/sunmi_aidl_print/SunmiAidlPrintPlugin.java /

You see in line 60 that the function is terminated successfully on that case with the call back result.success(this.getInfo(code))

However, there are many other cases where the callback is not called such as in lines 64-67. Please go through the code and terminate the function through callbacks to avoid the code getting stuck

halahmadi commented 3 years ago

Sorry, I was answering another issue.

For the issue regarding importing the plugin, I started first by writing my app over the "example" app, and it was working.