Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build fails: Could not find any version that matches com.android.support:multidex:25.+. #380

Closed
epetre opened this issue Oct 5, 2017 · 15 comments · Fixed by #385

Comments

@epetre
Copy link

epetre commented Oct 5, 2017

Removing this lines makes the build succeed.
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/5e329ae2ba480ad286eb5a5b7bc6bd05db681200/build.gradle#L9

Image of info

Some details about my android setup (using Android Studio 2.3.3).

My SDK Tools
SDK Tools

My platforms
My platforms

@ethanneff
Copy link
Contributor

Glad you were able to get it working. compile 'com.android.support:multidex:1.0.1 was added because the Branch SDK relies on some Google dependencies which cause our SDK to have over 64k methods. Removing it should not have any negative side effects.

I will monitor this issue to see if it pops up for any other partners.

Thanks,

@epetre
Copy link
Author

epetre commented Oct 6, 2017

Ok, I think it has something to do with Android Studio 2.3+ and how they structure their new dependencies but I'm not sure.

Maybe the Android team is going towards less support for Mulidexing now that they allow to pick and choose more specific sdk dependencies.

Also had to comment out this line otherwise the app crashed on boot.
https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/1dcdb7617179450147d75fd68bbacbba55884b9e/src/scripts/android/updateAndroidManifest.js#L19

@ethanneff
Copy link
Contributor

This is very valuable information to have. Thank you so much for your investigations. I have not worked with Android Studio 2.3+ yet, so I will add this version to my test plans to see if I can prevent this error from happening in the future.

@SeVeNDuS
Copy link

Hi,

I have also the same described problem

Hope to be solved soon ;)

Regards

@ethanneff
Copy link
Contributor

Thanks for the heads up!

Unfortunately, I will be out of town for the next couple of days, so I will not be able to build out a fix until next week. In the meantime, I would suggest following epetre's solution of ripping out the mulitdex references.

I apologize for this inconvenience. I will get a fix out as soon as I can.

@SeVeNDuS
Copy link

Thanks for the answer.

I have tried @epetre solution creating a fork and removing those lines but got the same error. So maybe, I have donde something wrong. @epetre do you have any fork with the temporal solution?

Regards and thanks!

@morganabel
Copy link

I am having this same issue and the fix is also not working for me.

@epetre
Copy link
Author

epetre commented Oct 16, 2017

Did you guys (@morganabel, @SeVeNDuS ) try adding/removing the plugin after you made those changes?

@morganabel
Copy link

I tried making the changes in a local directory and installed from there and I am still seeing the same problem. I used the lastest master, not idea why it worked for you and not me. Maybe another plugin is causing a conflict?

@SeVeNDuS
Copy link

Hi @epetre

I tried doing those changes in a forked repository of this one and install from that fork and got the same problem.
Removing the plugin cordova build android works properly

Regards

@SeVeNDuS
Copy link

HI @ethannef

Could you work something in this?

Thanks in advance

@Ziv-Barber
Copy link

Warning:
Adding com.android.support:multidex will make your app to crash in Android 4.4
Only Android 5.0+ supporting it

@Ziv-Barber
Copy link

cordova plugin add branch-cordova-sdk@2.4.9
will fix this and the other problems.
All the versions after 2.4.9 are not working in both Android and iOS

ethanneff added a commit that referenced this issue Oct 31, 2017
@ethanneff ethanneff reopened this Oct 31, 2017
@ethanneff
Copy link
Contributor

I have submitted a fix which removes Android multidexing. Testing this was a pain, so we have decided to remove it for now to unblock everyone. We will revisit this again issue in the future to see if we can add logic around multidexing depending on which version of Android Studio.

I have just updated the Branch Cordova SDK. I would recommend updating to the latest version 2.6.16. You can use this guide to update your Cordova Branch SDK. This version should fix the error you are receiving.

Thanks,

@Ziv-Barber
Copy link

thanks for all the work, I'll try again.
BTW:
Is there a fix for the deep link callback not been called in Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants