Giter VIP home page Giter VIP logo

Comments (20)

renesansz avatar renesansz commented on July 17, 2024

@optikalefx
I'll try to look at this problem, currently I don't have any test apps to try out the reported issue.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

ok, ill try to give you any more info I find as I dive into this as well

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

The last known working date on this was feb 23rd

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

Checking out both coded bases around that date allows it to work. (and of course changing the interface for branch to allow running this back then)

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

pushbots plugin does not have to be set back on the 23rd. So the latest pushbots with #81d4aed7f0d0a5f32226cfc0b0fc20b4a0c500da of branch works.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

OK, got the commit.

This works
9cfe039

This fails
bff6c97

So bff6c97 broke the build when combined with pushbots.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

Thanks for the info @optikalefx ,
I'll try to look at the commits to see which causes the issue with pushbot.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

So far, the difference with the commits are only the iOS changes..
I would like to know the version of the plugin you're using?

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

I'm using Pushbots on https://github.com/pushbots/phonegap/tree/master and branch on the commit one mentioned above.

Side note - It's possible that iOS changes can affect an android build. wkWebView used to mess that up to the point that I had to have that iOS specific plugin commented one when building for android.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

@optikalefx,
I see, I wasn't aware of such problem. However, could you try using the latest branch.io plugin?
There might be problems with these and might be fixed in the future commits.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

So starting with bff6c97 all the way up to the latest it throws the same cordova build errors found here pushbots/phonegap#33

I can paste more examples but it's always the same build error.

* What went wrong:
Execution failed for task ':transformClassesWithDexForArmv7Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

Slightly different if I build without crosswalk, but similar error.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> 
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

These are both built with the latest versions of both plugins.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

@optikalefx ,
I see, this is weird, I'm trying to replicate the issue but I'm having hard time to duplicate one..

At the moment, can you re-build your app by doing the following:

  1. Remove all platforms (Simply remove the platforms directory)
  2. Remove all plugins (Simply remove the plugins directory)
  3. Re-install your platforms (cordova platform add <android/ios>)
  4. Re-install your plugins (cordova plugin add <plugin-here>)
  5. Build your app (phonegap build <android/ios>)
  6. Run the app

I'll give you an update once I've made any progress on replicating the issue.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

@optikalefx ,
Okay, so I was able to replicate the error now, so after some reading.
I bump in to some Android related issues, and was able to fix mine.
Here are possible solutions:

  • In your build.gradle file add multiDexEnabled true inside your defaultConfig
defaultConfig {
    multiDexEnabled true
}
  • Remove the android-support-v4.jar in your Android libs directory.
  • Execute ./gradlew clean in the Android directory

References:

Let me know if this fixes the issue.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

So this does fix it, do you know if there is a way to do this from the plugin perspective? Having to do this on every build is obviously a pain. Also I have a build step so I'd need to add this file manipulation in there at some point if the plugin can't add this.

Maybe you have an option to add multiDex from your end?

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

Hey @optikalefx , Glad to hear that the fix works for you.
I'll try to find a much more convenient solution to automate the fix for this kind of issue.

At the moment, you can only modify the AndroidManifest.xml on a plugin. Not sure if it's possible to modify other files than that.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

The only way I know to do this otherwise is to create a pre-build hook sh file that does string regex. Not the most ideal for sure. Looking forward to seeing what you find

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

I see, I'll try to look at it if its doable. I'll let you know if I'm able to automate it.

Cheers,
Rene

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

I found an automatic way in my grunt-phonegap setup. Using shell js inside of a before-build file.

in _phonegap.xml

<platform name="android">
    <allow-intent href="market:*" />
    <hook type="before_build" src="../lib/before-build.android.js" />
</platform>

inside of the before build file

// deep
var gradleFile = 'platforms/android/build.gradle';
shell.sed('-i', 'defaultConfig {', 'defaultConfig {\n\t\t\t\tmultiDexEnabled true', gradleFile);
shell.rm('platforms/android/libs/android-support-v4.jar');
shell.exec('cd platforms/android && ./gradle clean');

from cordova-ionic-phonegap-branch-deep-linking-attribution.

renesansz avatar renesansz commented on July 17, 2024

@optikalefx ,
Thanks for the build hook, however I can't assure that this would be merged from the master as we don't know if there will be other plugins that will be using the android-support-v4.jar.

Closing the issue now.

Cheers,
Rene

from cordova-ionic-phonegap-branch-deep-linking-attribution.

optikalefx avatar optikalefx commented on July 17, 2024

yea I don't thinks should be included for you, but at least this ticket is here for others.

from cordova-ionic-phonegap-branch-deep-linking-attribution.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.