darryncampbell / darryncampbell-cordova-plugin-intent

General purpose intent shim layer for cordova appliations on Android. Handles various techniques for sending and receiving intents.
MIT License
86 stars 136 forks source link

Get build Error when adding 'darryncampbell-cordova-plugin-intent' #59

Closed pilz97 closed 5 years ago

pilz97 commented 6 years ago

Hello,

when I add the plugin I get the folling error: `A problem occurred configuring root project 'android'.

Could not resolve all dependencies for configuration ':_debugApkCopy'. Could not find com.android.support:support-v4:27.1.0. Searched in the following locations: .... ` Angular-Cli: 6.1.4 Cordova: 8.0.0

When I remove the plugin everything works fine.

darryncampbell commented 6 years ago

Hi, do you have the support repository installed? Point 3 under https://cordova.apache.org/docs/en/latest/guide/platforms/android/

pilz97 commented 6 years ago

Hi @darryncampbell

thanks for the answer.

Yes I have, I already uninstalled it and then installed it again!

darryncampbell commented 6 years ago

Strange. Are you able to build https://github.com/darryncampbell/plugin-intent-api-exerciser? It could be some interaction with some other Plugin. Also, perhaps try v1.1.0 of this plugin, I pushed a change yesterday to create 1.1.1 but I'm always suspicious of issues raised immediately after an update.

pilz97 commented 6 years ago

I can build https://github.com/darryncampbell/plugin-intent-api-exerciser! Same issue with v1.1.0 :(

I saw you are using cordova 7.0.0, could this make problems (I'm using v8)

darryncampbell commented 6 years ago

Interesting... maybe it is some conflict... what other plugins are you using in your app?

pilz97 commented 6 years ago

These are my plugins:

`

<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git"/>
<plugin name="cordova-plugin-device" spec="~1.1.5"/>
<plugin name="cordova-plugin-statusbar" spec="~2.2.2"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.2"/>
<plugin name="cordova-plugin-camera" spec="~4.0.3"/>
  <plugin name="cordova-plugin-whitelist" spec="~1.3.3" />
  <plugin name="cordova-plugin-intent" spec="https://github.com/ngocdaothanh/cordova-plugin-intent-action.git" />
  <plugin name="com-darryncampbell-cordova-plugin-intent" spec="1.1.0" />`
darryncampbell commented 6 years ago

Can you please try removing and re-adding the cordova plugin:

cordova plugin remove com-darryncampbell-cordova-plugin-intent cordova plugin add com-darryncampbell-cordova-plugin-intent

Reason being is that the plugin should be added after the camera plugin (I forget why, something to do with the provider paths in the manifest) - there is a note in this plugin's readme.

If that doesn't work then I'm out of ideas I'm afraid as I can't reproduce the issue.

pilz97 commented 6 years ago

Hm doesn't fix my error..

I Changed the android version to v6.3.0 instead of v6.2.3 (because there was a warning in the build..) Now i get a other error:

`Execution failed for task ':transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCom pat$AccessibilityServiceInfoVersionImpl; `

darryncampbell commented 6 years ago

Ah, that's one difference with my set-up, is there any reason you can't upgrade to android 7.x? (I have 7.0)

pilz97 commented 6 years ago

Ok but this error happens due to a other plugin!

Yes because the app should be available for devices with Android >=6, the most devices which are using the apk have android 6!

Thank you so much for your help!

snazaca02 commented 6 years ago

Hi, I'm running into the same issue and I have been trying to install the correct support library. However after installing the android support repository through the Android SDK GUI it doesn't include the support library for 27.1.0.

After looking on their site they said they were discontinuing the GUI; So I went to the maven they direct you to install it manually. It either has bad 404 requests or not all of the files needed for the android support v4:27.1.0

Do you happen to know where I can find it and go about resolving this issue? or if there is some other way? I'm not seeing any other way to use intents in my environment outside of your plugin. Any help would be greatly appreciated. I believe if I get the correct library I should be able to build this just fine.

darryncampbell commented 6 years ago

If it is the same issue, can you ensure you are building with Cordova Android 7.x and then remove all other plugins - it should then build... then start adding the plugins back in one by one to identify where there is incompatibility.

darryncampbell commented 5 years ago

Closing - presuming resolved