wymsee / cordova-imagePicker

Cordova Plugin For Multiple Image Selection
MIT License
407 stars 853 forks source link

On Android: during PGB process causes other plugs to emit "/AndroidManifest" file not found #265

Open cepm-nate opened 6 years ago

cepm-nate commented 6 years ago

This one took a while to figure out!

If you include this plugin BEFORE other plugins, (specifically cordova-sqlite-evcore-extbuild-free and cordova-plugin-email-composer), it makes the other plugins error out with code like "/AndroidMaifest file not found".

But if you include this plugin AFTER all the other plugins, then the build process fails with three or four errors like :app:processDebugResources/app/src/main/res/layout/actionbar_discard_button.xml:22: AAPT: error: resource drawable/ic_action_discard_light (aka APPNAME:drawable/ic_action_discard_light) not found.

If you REMOVE this plugin completely, things build fine. :-)

My list of plugins:

<plugin name="cordova-plugin-whitelist"             spec="^1.3.3" />
    <plugin name="cordova-plugin-dbcopy"                spec="^2.0.0" />
    <plugin name="cordova-plugin-network-information"   spec="^2.0.0" />
    <plugin name="cordova-plugin-inappbrowser"          spec="^2.0.0" />
    <plugin name="cordova-plugin-file"                  spec="^5.0.0" /> 
    <plugin name="cordova-plugin-file-transfer"     spec="^1.7.0" />
    <plugin name="cordova-plugin-statusbar"         spec="^2.3.0" />
    <plugin name="cordova-plugin-splashscreen"      spec="^5.0.0" />
    <plugin name="cordova-plugin-dialogs"           spec="^2.0.0" />
    <plugin name="cordova-plugin-appversion"        spec="^1.0.0" />
    <plugin name="cordova-plugin-device"            spec="^2.0.0" />
    <plugin name="cordova-plugin-x-socialsharing"   spec="^5.2.1" />
    <plugin name="cordova-plugin-printer"           spec="^0.7.3" />
    <plugin name="ionic-plugin-keyboard"            spec="^2.2.1" />
    <plugin name="phonegap-plugin-barcodescanner"   spec="^7.0.0">
        <variable name="CAMERA_USAGE_DESCRIPTION"   value="To scan barcodes." />
    </plugin>
    <plugin name="cordova-plugin-camera" >
        <variable name="CAMERA_USAGE_DESCRIPTION"   value="To take photos." />
    </plugin>
    <plugin name="cordova-sqlite-evcore-extbuild-free" />
    <platform name="ios">
        <plugin name="cordova-plugin-email"             spec="^1.2.6" />
        ...
    </platform>
    <platform name="android">
        <plugin name="cordova-plugin-email-composer"    />
        ...
    </platform>

For now I've switched back to using the regular Camera plugin to select one image at a time, as this works on both iOS and Android. It would be nice to have this multi-image picker working in the future though!

DmcSDK commented 5 years ago

I recently made a new plugin:https://github.com/DmcSDK/cordova-plugin-mediaPicker