tmalbonph / cordova-plugin-sunmi-inner-printer

Cordova/Ionic Plugin for Sunmi V1 Printer
MIT License
15 stars 19 forks source link

Sunmi T2 printer #7

Closed phidoi247 closed 4 years ago

phidoi247 commented 4 years ago

I using your plugin in ionic 5. sunmiInnerPrinter.printerSelfChecking() is ok but printOriginalText() and printString() is not work. Can you help me to fix this

tmalbonph commented 4 years ago

@phidoi247 please post the error here.

phidoi247 commented 4 years ago

I'm tested on ionic serve

declare var sunmiInnerPrinter: any;
@Component
...
printTest() {
    sunmiInnerPrinter.printerInit();
    sunmiInnerPrinter.printString('Test print');
  }

It's say sunmiInnerPrinter is not declared.

phidoi247 commented 4 years ago

But when i build to apk file. The function printerSelfChecking() work perfect But function printString() is not work And i dont know how to view error log in this sunmi t2 device

tmalbonph commented 4 years ago

@phidoi247 How you build your APK? I am asking because, I want to know how is your app includes this cordova-plugin-sunmi-inner-printer/www/innerpriter.js ?

phidoi247 commented 4 years ago

@phidoi247 How you build your APK? I am asking because, I want to know how is your app includes this cordova-plugin-sunmi-inner-printer/www/innerpriter.js ?

cordova plugin add https://github.com/tmalbonph/cordova-plugin-sunmi-inner-printer.git -> after this i was deleted platform/android ionic cordova platform add android
ionic cordova build android

tmalbonph commented 4 years ago

@phidoi247 you can look at discussion here https://github.com/labibramadhan/cordova-sunmi-inner-printer/issues/14 And comeback here if you can't still resolve your issue.

phidoi247 commented 4 years ago

https://github.com/labibramadhan/cordova-sunmi-inner-printer/issues/14

i followed your link. But i cant do the 5th step Its say: > Could not find method compile() for arguments [com.sunmi:sunmiui:latest.release] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

tmalbonph commented 4 years ago

But i cant do the 5th step You should locate platforms/android/build.gradle and edit it as posted

natnat1432 commented 1 year ago

Hello, I'm using the cordova plugin inside my capacitor project. Is there any way how to fix this?

This is the error:

Could not find any matches for com.sunmi:sunmiui:latest.release as no versions of com.sunmi:sunmiui are available. Required by: project :capacitor-cordova-android-plugins

natikins86 commented 1 year ago

Having the same issue, no longer able to build or release updates, not possible to remove this plugin unfortunately, is there anyway to override to build?

Could not find any matches for com.sunmi:sunmiui:latest.release as no versions of com.sunmi:sunmiui are available. Searched in the following locations:

fr20587 commented 1 year ago

@natikins86 have you solved this? I need help with the same issue