Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Installation Gives Error in Android #4

Open
kartiksolanki opened this issue Aug 31, 2020 · 1 comment
Open

Plugin Installation Gives Error in Android #4

kartiksolanki opened this issue Aug 31, 2020 · 1 comment

Comments

@kartiksolanki
Copy link

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.

@yannisalexiou
Copy link

yannisalexiou commented Feb 11, 2021

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'].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants