Open kartiksolanki opened 4 years ago
Removing the below lines from plugin.xml
resolves the issue in my case.
<!-- jniLibs -->
<source-file src="src/android/libs/arm64-v8a/libepos2.so" target-dir="jniLibs/arm64-v8a/" />
<source-file src="src/android/libs/armeabi-v7a/libepos2.so" target-dir="jniLibs/armeabi-v7a/" />
<source-file src="src/android/libs/armeabi/libepos2.so" target-dir="jniLibs/armeabi/" />
<source-file src="src/android/libs/x86_64/libepos2.so" target-dir="jniLibs/x86_64/" />
<source-file src="src/android/libs/x86/libepos2.so" target-dir="jniLibs/x86/" />
<lib-file src="src/android/libs/ePOS2.jar" target-dir="jniLibs/" />
This happens because files from libs are copied to jniLibs
folder automatically, this process has been specified in plugin-build.gradle
in this line jniLibs.srcDirs = ['libs']
.
cordova plugin add cordova-plugin-epson-epos2 Installing "cordova-plugin-epson-epos2" for android Error during processing of action! Attempting to revert... Failed to install 'cordova-plugin-epson-epos2': CordovaError: Uh oh! "/Users/wearesas/Desktop/dr-operations-android/platforms/android/app/src/main/jniLibs/arm64-v8a/libepos2.so" already exists! at copyNewFile (/Users/wearesas/Desktop/dr-operations-android/platforms/android/cordova/lib/pluginHandlers.js:234:45) at install (/Users/wearesas/Desktop/dr-operations-android/platforms/android/cordova/lib/pluginHandlers.js:34:17) at ActionStack.process (/Users/wearesas/Desktop/dr-operations-android/node_modules/cordova-common/src/ActionStack.js:56:25) at PluginManager.doOperation (/Users/wearesas/Desktop/dr-operations-android/node_modules/cordova-common/src/PluginManager.js:114:20) at PluginManager.addPlugin (/Users/wearesas/Desktop/dr-operations-android/node_modules/cordova-common/src/PluginManager.js:144:17) at /Users/wearesas/Desktop/dr-operations-android/platforms/android/cordova/Api.js:210:74 at _fulfilled (/Users/wearesas/Desktop/dr-operations-android/node_modules/q/q.js:854:54) at /Users/wearesas/Desktop/dr-operations-android/node_modules/q/q.js:883:30 at Promise.promise.promiseDispatch (/Users/wearesas/Desktop/dr-operations-android/node_modules/q/q.js:816:13) at /Users/wearesas/Desktop/dr-operations-android/node_modules/q/q.js:877:14 Uh oh! "/Users/wearesas/Desktop/dr-operations-android/platforms/android/app/src/main/jniLibs/arm64-v8a/libepos2.so" already exists!
Any idea what is going wrong? Any help is appreciated.