-
Notifications
You must be signed in to change notification settings - Fork 509
cordova-android@7.0.0 incompatibility #599
Comments
Having the exact same issue in a non ionic cordova app |
Hey @peterpeterparker I opened a pull request for it. In the meantime you could try
and let me know how it works. |
@amritk sweet, thx for taking the time to fix it! It looks good to me too, with your PR I was able to build a project with note: I didn't tested the results but I checked the platform to see if |
Add string resources into (I am using linux ubuntu this is my ionic project path) file : /home/user/js/fb4/platforms/android/app/src/main/res/values/strings.xml
and my project now works! |
I can't get the app to see the facebook API after the fix... any ideas? |
As a temporary fix which doesn't need manual editing of any platform specific files: Add to
|
Also seeing this problem with @ChrisHSandN Thank you for your solution! This worked for me. |
cool @ChrisHSandN your workaround just works fine |
@ChrisHSandN thanks! |
@ChrisHSandN Day saver, Thanks! |
@ChrisHSandN I see the following when I add that to my config.xml
|
@ChrisHSandN thanks man! |
@ChrisHSandN thank you, is working |
@jjrchrds I was having the same issue. I fixed it by changing the parent attribute to |
@amritk @jdeanwaite - I too am running Cordova@8.0, cordova-android@7.0. The native/base facebook4 plugin installs but errors out during compile. I used the version @amritk posted just above I am migrating my app which is currently on older revs of everything (ionic v1, Cordova 7, cordova-android: 6.2.3) so today I was just rebuilding my environment to be the 42 different plugins my app uses all installed, compiled and stable. This facebook4 plugin was the last one and at the moment it looks like its working. Now I get to spend the next few weeks porting all my code from Ionic v1 format into the newer v3 format - and then probably rewriting tons of extra stuff to take advantage of all the new techniques and features. Ugh...not looking forward to this! |
@rolinger If you're only starting to port it and you can wait, you'd better wait for v4 to go out as it might change a lot of things you just changed. v3 doesn't get any support anymore :( |
In addition to @ChrisHSandN solution above, the plugin.xml file for this plugin needs to be updated as well to work with the latest libraries. Line 46 needs to be updated to:
|
@HugoHeneault where is v4 branch |
We're talking about ionic v4 branche, it's the "core" branch ;) |
Remove platform 7.0.0 and install 6.4.0 ionic cordova platform rm android ionic cordova platform add android@6.4.0 |
@marcocanino - worked like a charm for my ionic app, that seemed the easiest out of all the listed ideas. Thank you. |
no way with android 7.0.0 or 7.1.0? |
this is the currently working npm isntall -g cordova@7.1 |
Hey there, I added the following config into config.xml:widget (not ): mode="add" was necessary for me. <edit-config file="res/values/strings.xml" mode="add" target="/resources">
<string name="fb_app_id">1234</string>
<string name="fb_app_name">foobar</string>
</edit-config> My environment:
Also keep following in mind: https://github.com/jeduan/cordova-plugin-facebook4/blob/master/docs/android/README.md#older-cordova-cli |
Folks! I love you all! It worked for me: In plugin.xml:
Thanks a lot, |
@ChrisHSandN Solutions works like a charm for Android 7.0.0:) |
Just here to report that Cordova 7.x + Android 7.x is not working with any of the work arounds found in this ticket. See #718 |
@ChrisHSandN |
@globules-io I just found a solution that work after struggling for days.
works on linux but on windows platform you have to remove the './' at the beginning of target lie this :
after removing and adding your platform again you may have an other scarry error while building, you can solve by updating your project.properties with this :
instead of this : I tryed to automize that update by putting that line under platform="android" : |
@ChrisHSandN Thank you for your solution! This worked for me. |
I am on Android 7.0.0 and I am experiencing the same problem but I keep getting this error:
I tried both:
and:
and it's still not working. I even tried adding |
UPDATE: This version by @amritk fixed it for me: |
@spinninghamster only thing that worked for me on Windows with Android 7 is add strings by hand in strings.xml... |
@ChrisHSandN solution works perfectly 👍 |
Has anyone found a solution or work around for PGB cordova android 7.0.0? |
Yes :) |
@davidluthiers appreciated! saved my life! ive been trying to solve this for 2 days. |
I still seem to have an error with the solutions provided above. I am using the latest version of this plugin with cordova version 8.0.0 and Android 7.1.4. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Any ideas what is the cause? Downgrading my android is not an option as i have other plugins requiring this. |
For those who still are having problems and happens to have the Check out this stackoverflow answer for a step-by-step solution. It worked for me. Apparently, those plugins have incompatibility issues.... |
I just released v4.0.0 which solves this issue without the need of any workaround anymore. Also note that the improvement in the tooling is backwards compatible with cordova-android < v7 too. BREAKING CHANGE: Note that if you would have add the workaround in your Thx @adipascu for the PR, you deserve a cookie 👍 |
I just wanted to add to this thread for anyone reading it - if you are using Cordova >= 7 and cordova-android >= 7 and you still see these warnings, that is to be expected! You should see it printed out 3 times ONLY - any more than that and you have a genuine issue. This is because for backwards compatibility, the plugin attempts to update BOTH the Cordova <= 6 and Cordova 7+ file paths, and if you are on later Cordova, naturally you don't have the <= 6 paths, so it emits a warning. This is normal. |
@ChrisHSandN Your solution got my builds working again. Kudos sir 👍 |
I also notice if you have cordova-universal-link plugin, building won't work |
Hi,
It looks like
cordova-plugin-facebook4
isn't compatible withcordova-android
7.0.0I'm guessing that the incompatibility source is the following element in
plugin.xml
Regarding what was indicated in https://cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html
Steps to reproduce:
Thx in advance for any help
Stacktrace:
The text was updated successfully, but these errors were encountered: