ionicthemes / ionic3-image-handling

In this ionic tutorial you will learn how to access the image gallery and take pictures from an ionic app. Also we will show you how to add a image cropper. This ionic tutorial includes a working ionic app example you can reuse for your needs.
https://ionicthemes.com/tutorials/about/ionic-2-image-handling
35 stars 18 forks source link

Error during processing of action! Attempting to revert... Failed to install 'cordova-plugin-image-picker': CordovaError: Uh oh! #1

Open sshaik305 opened 6 years ago

sshaik305 commented 6 years ago

why we suppose to use 2 cordova image picker plugins in this image handling ? I am getting the following error when I build the android platform. Please help me where will be the error

This is the installation cmd script 👍 Installing "cordova-plugin-device" for android

Adding cordova-plugin-device to package.json Saved plugin info for "cordova-plugin-device" to config.xml

Discovered plugin "cordova-plugin-image-picker" in config.xml. Adding it to the project

Installing "cordova-plugin-image-picker" for android

Error during processing of action! Attempting to revert...

Failed to install 'cordova-plugin-image-picker': CordovaError: Uh oh! "C:\Users\subhani\Downloads\ionic3-image-handling-master\ionic3-image-handling-m aster\platforms\android\src\com\synconset\ImagePicker.java" already exists! at copyNewFile (C:\Users\subhani\Downloads\ionic3-image-handling-master\ioni c3-image-handling-master\platforms\android\cordova\lib\pluginHandlers.js:245:45)

at install (C:\Users\subhani\Downloads\ionic3-image-handling-master\ionic3-i

mage-handling-master\platforms\android\cordova\lib\pluginHandlers.js:43:17) at Object.process (C:\Users\subhani\Downloads\ionic3-image-handling-master\i onic3-image-handling-master\platforms\android\cordova\node_modules\cordova-commo n\src\ActionStack.js:56:25) at PluginManager.doOperation (C:\Users\subhani\Downloads\ionic3-image-handli ng-master\ionic3-image-handling-master\platforms\android\cordova\node_modules\co rdova-common\src\PluginManager.js:114:20) at PluginManager.addPlugin (C:\Users\subhani\Downloads\ionic3-image-handling -master\ionic3-image-handling-master\platforms\android\cordova\node_modules\cord ova-common\src\PluginManager.js:144:17) at C:\Users\subhani\Downloads\ionic3-image-handling-master\ionic3-image-hand ling-master\platforms\android\cordova\Api.js:243:74 at _fulfilled (C:\Users\subhani\Downloads\ionic3-image-handling-master\ionic 3-image-handling-master\platforms\android\cordova\node_modules\q\q.js:854:54) at self.promiseDispatch.done (C:\Users\subhani\Downloads\ionic3-image-handli ng-master\ionic3-image-handling-master\platforms\android\cordova\node_modules\q\ q.js:883:30) at Promise.promise.promiseDispatch (C:\Users\subhani\Downloads\ionic3-image- handling-master\ionic3-image-handling-master\platforms\android\cordova\node_modu les\q\q.js:816:13) at C:\Users\subhani\Downloads\ionic3-image-handling-master\ionic3-image-hand ling-master\platforms\android\cordova\node_modules\q\q.js:570:49

Failed to restore plugin "cordova-plugin-image-picker" from config.xml. You migh t need to try adding it again. Error: Uh oh! "C:\Users\subhani\Downloads\ionic3-image-handling-master\ionic3-image-handling-m aster\platforms\android\src\com\synconset\ImagePicker.java" already exists! Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project Installing "cordova-plugin-splashscreen" for android

Adding cordova-plugin-splashscreen to package.json Saved plugin info for "cordova-plugin-splashscreen" to config.xml Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the pro ject Installing "cordova-plugin-statusbar" for android

Adding cordova-plugin-statusbar to package.json Saved plugin info for "cordova-plugin-statusbar" to config.xml

Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the pro ject Installing "cordova-plugin-whitelist" for android

           This plugin is only applicable for versions of cordova-android gr

eater than 4.0. If you have a previous platform version, you do not need this plugin since the whitelist will be built in.

Adding cordova-plugin-whitelist to package.json

Saved plugin info for "cordova-plugin-whitelist" to config.xml Discovered plugin "ionic-plugin-keyboard" in config.xml. Adding it to the projec t

Installing "ionic-plugin-keyboard" for android

Adding ionic-plugin-keyboard to package.json

Saved plugin info for "ionic-plugin-keyboard" to config.xml

--save flag or autosave detected

Saving android@~6.3.0 into config.xml file ... [ERROR] Exception:

willyguevara commented 5 years ago

im facing the same problem. can´t build my project, this is my build log.

Why is saying ImagePicker.java" already exists! ??

Installing "cordova-plugin-telerik-imagepicker" for android
Android Studio project detected
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-telerik-imagepicker': CordovaError: Uh oh!
"/platforms/android/app/src/main/java/com/synconset/Imag
ePicker.java" already exists!
    at copyNewFile (/platforms/android/cordova/lib/plugi
nHandlers.js:259:45)
    at install (/platforms/android/cordova/lib/pluginHan
dlers.js:43:17)
    at Object.process (/platforms/android/cordova/node_m
odules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/platforms/android/cor
dova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/platforms/android/cordo
va/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /platforms/android/cordova/Api.js:247:74
    at _fulfilled (/platforms/android/cordova/node_modul
es/q/q.js:834:54)
    at self.promiseDispatch.done (/platforms/android/cor
dova/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/platforms/andro
id/cordova/node_modules/q/q.js:796:13)
    at /platforms/android/cordova/node_modules/q/q.js:55
6:49
Uh oh!
"/platforms/android/app/src/main/java/com/synconset/Imag
ePicker.java" already exists!
[ERROR] An error occurred while running subprocess cordova.

        cordova plugin add cordova-plugin-telerik-imagepicker --variable "PHOTO_LIBRARY_... exited with exit
        code 1.

        Re-running this command with the --verbose flag may provide more information.