giorgiofellipe / cordova-plugin-datecs-printer

Cordova plugin to print on Mobile Bluetooth ESC/POS Printers - Tested on Datecs DPP-250 Printer
MIT License
73 stars 60 forks source link

Build Error with Cordova 7 #107

Closed kor86 closed 5 years ago

kor86 commented 6 years ago

Hi, getting following error when building with cordova android build on version 7

cp: copyFileSync: could not write to dest file (code=ENOENT):/home/xxx/abc/platforms/android/res/xml/config.xml

Parsing /home/xxx/abc/platforms/android/res/xml/config.xml failed (node:18858) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/xxx/abc/platforms/android/res/xml/config.xml' at Object.fs.openSync (fs.js:660:18) at Object.fs.readFileSync (fs.js:565:33) at Object.parseElementtreeSync (/home/xxx/abc/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) at new ConfigParser (/home/xxx/abc/platforms/android/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js:30:24) at updateConfigFilesFrom (/home/xxx/abc/platforms/android/cordova/lib/prepare.js:106:18) at Api.module.exports.prepare (/home/xxx/abc/platforms/android/cordova/lib/prepare.js:42:20) at Api.prepare (/home/xxx/abc/platforms/android/cordova/Api.js:192:45) at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:106:36 at _fulfilled (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30) (node:18858) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:18858) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

sJonatas commented 6 years ago

Hello man, I've just solved this error. Maybe this work for u:

First, reinstall your platform

cordova platform remove android
cordova platform add android

so, add this plugin

cordova plugin add cordova-android-support-gradle-release --variable 
 ANDROID_SUPPORT_VERSION=24.+

at last, build ur project cordova build

pufanalexandru commented 6 years ago

I have the same problem and the solution proposed by @sJonatas didn't solve it

pufanalexandru commented 6 years ago

Solved the problem with the solution from this pull request: https://github.com/giorgiofellipe/cordova-plugin-datecs-printer/pull/101

kavinRkz commented 6 years ago

it works fine cordova-android -6.3.0 ANDROID_SUPPORT_VERSION=27.+

giorgiofellipe commented 5 years ago

PR #101 merged. Should be working on version 0.8.3.