ImagePicker: cordova-plugin-telerik-imagepicker cannot be added. changes in this plugin conflicts with changes in config.xml. Conflicts must be resolved before plugin can be added.
It seem as if the latest version of ImagePicker is having issues installing in an Ionic app. From what I’ve read the issue is a conflict in the attempt to add the <edit-config> to the plugin.xml while it’s currently present in the config.xml.
This is what i have in the config.xml:
<platform name="android"> <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:networkSecurityConfig="@xml/network_security_config" /> <application android:allowBackup="false" /> <application android:fullBackupContent="false" /> <application android:usesCleartextTraffic="true" /> </edit-config>
Even if I delete that from config.xml or delete the <edit-config> attribute in the plugin.xml I keep getting the error when attempting to add the plugin.
Is there any workaround for this?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 25
Commits related to this issue
- Revert #210 Reverted PR - #210 For fixing issue - #216 — committed to Telerik-Verified-Plugins/ImagePicker by anujraghuvanshi 3 years ago
here‘s a simple solution:
download the latest release from github release release v2.3.5.
unzip the source code to plugins folder of project root, and rename it to
cordova-plugin-telerik-imagepickerthe current workaround for this error is: install plugin version 2.3.3 for now till the issues get fixed by telerik team and update below configuration in config.xml file manually.
<platform name="android"> <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:networkSecurityConfig="@xml/network_security_config" /> <application android:requestLegacyExternalStorage="true" /> </edit-config> </platform>They have added
<application android:requestLegacyExternalStorage="true" />to config.xml to support imagepicker in android 10 devices.@syftedesigns : seems that you are beginner in ionic. you have to install 2 library, 1 for cordova and another for javascript.
add this plugin to your app module.
refer this link for usage: https://ionicframework.com/docs/native/image-picker
The best solution to solve the issue is to add image picker plugin via git cordova plugin add git+https://github.com/Telerik-Verified-Plugins/ImagePicker.git#2.3.4
Try this, it’s working for me!
Guys, Seems many are stuck due to this issue. Can any volunteer submit PR for this here ?
I’ve found that the improper use of version numbers means they cannot be relied upon to get consistent downloads of the plugin. So the command I used to get a version that would install was:
It is version 2.3.5 before it was broken. You will still need to manually edit the config.xml file as described above.
@chetanmore0510
thank you so much , resolve my problem perfectly 。
i use ionic4 and add cordova plugin cordova-plugin-telerik-imagepicker but it doesnt work say that
xxxx\plugins\cordova-plugin-telerik-imagepicker\src\android\com\synconset\ImagePicker\ImagePicker.java already exist 。there are my stepsionic cordova plugin add cordova-plugin-telerik-imagepicker@2.3.3 npm install @ionic-native/image-picker<application android:requestLegacyExternalStorage="true" />to config.xmlcordova.system.library.2=com.android.support:support-v4:27.+tocordova.system.library.2=com.android.support:support-v4:26.+in \platforms\android\project.properties it finally worked !Yes, It works for me. Please make sure you have updated android sdk tools. Cordova CLI : 10.0.0 Cordova Platforms : android 9.0.0 cordova-plugin-telerik-imagepicker 2.3.3 config.xml: <preference name="android-minSdkVersion" value="22" /> <preference name="android-targetSdkVersion" value="29" /> <platform name="android"> <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:requestLegacyExternalStorage="true" /> </edit-config> <config-file parent="/manifest/application" platform="android" target="AndroidManifest.xml"> <activity android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@style/Theme.AppCompat.Light" /> </config-file> </platform>
Don’t forget to remove and add platform after doing the above changes. All the best
On Wed, Oct 14, 2020 at 3:22 AM jun.zhao notifications@github.com wrote:
ionic cordova plugin add cordova-plugin-telerik-imagepicker@2.3.3You can specify version number after @. this will download specific version of plugin, otherwise it will pick the latest one.
you can see the various versions on given link https://www.npmjs.com/package/cordova-plugin-telerik-imagepicker?activeTab=versions