ImagePicker: android 7.0 install plugin fails

Upgrading to Android platform 7.0 fails. I get the following error: Failed to install 'com.synconset.imagepicker': Error: ENOENT: no such file or directory, open '../platforms/android/AndroidManifest.xml'

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 15
  • Comments: 25

Most upvoted comments

Here is my for-now solution…

  1. Make sure Image picker is not installed(see if it’s in the cordova plugin ls)
  2. Run cordova platform add android to setup android platform
  3. Now, create a symlink to legacy location(android/AndroidManifest.xml). Below is the commend for my case.
$ln -s /Users/andre/my_project/platforms/android/app/src/main/AndroidManifest.xml /Users/andre/my_project/platforms/android/AndroidManifest.xml
  1. Now finally install Image picker plugin!
$cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git --variable PHOTOLIBRARY_USAGE_DESCRIPTION="Allow the app to access your photos" --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="Allow the app to access your photos"

Creating the symlink did the trick for me. It’s works for now…

I found this hook

In your config.xml file add:

<platform name="android">
        <hook src="hooks/patch-android-studio-check.js" type="before_plugin_install" />
        <hook src="hooks/patch-android-studio-check.js" type="before_plugin_add" />
</platform>

And then you can install.

Cordova 7 has changed app structure, now AndroidManifest.xml is inside app/src/main/ plugin should be updated to use it with Cordova Android 7.

+1 please!

+1 need this.

cordova-android-7 there is a release note here, but i don’t know how to do

Anyone with a solution for android 7 ???

@ratanahing I downgraded to android@6.4.0 and used this fork https://github.com/shaik305/cordova-plugin-image-picker.git

No, downgraded back to Cordova Android 6.4…

I am facing same issue . did you solve the problem?