Closed doug1e closed 5 years ago
Hi @doug1e,
Than you very much for finding the bug, reporting it and being so descriptive :+1:
I've just bumped a new version that should fix the bug: v1.1.1. I will appreciate if you test it and let me know if your problem was finally fixed.
If I have some extra time I'll try to update also the ionic plugin to include full functionality.
Regards.
Works like a charm Alberto :) You are the best, huge thanks
Hi Alberto,
Apologies for reopening the issue. Although the above build error is gone, I now get merging errors when I include another plugin (https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin)
Please see the error below:
D8: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForRelease'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
This may be a totally different issue and maybe related to ionic/cordova changes, etc. I managed to bypass the error by the following:
ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter
I cannot launch the app right now and trying to figure out the issue. Again, this may be nothing to do with your changes but I thought I would let you know just in case.
Regards,
Doug
Hi again,
I've seen you've already opened an issue in the other repository, I'll put a link here only to be able to track it: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/1044
The thing is that there is a new version of the support library called AndroidX which is being used from the Android 9.0 (API level 28) version. This is being used by the latest Google Play Services library which is the one used by my plugin.
In order to avoid this kind of problem, I've released a new version just now (1.1.2) which allows to change Google Play Service libraries used so you can adapt it as you need.
For example you can install the plugins like this:
ionic cordova plugin add cordova-plugin-play-games-services --variable APP_ID="XXXXXX" --variable ANDROID_PLAY_SERVICES_GAMES_VERSION="16.+" --variable ANDROID_PLAY_SERVICES_PLUS_VERSION="16.+"
ionic cordova plugin add cordova-plugin-x-socialsharing --variable ANDROID_SUPPORT_V4_VERSION="+"
By using the 16.x version of the libraries you will be able to keep using the android.support.*
libraries while the Social Sharing plugin moves to the new system.
I close the issue again, feel free to reopen it if you get in troubles.
Many thanks for the clarification Alberto
Hi @Artberri,
I just tried to build my project recently but I get errors as below:
`E:\phonegap\f2048\platforms\android\app\src\main\java\com\berriart\cordova\plugins\GameHelper.java:43: error: package com.google.android.gms.games.request does not exist
import com.google.android.gms.games.request.GameRequest;
^
E:\phonegap\f2048\platforms\android\app\src\main\java\com\berriart\cordova\plugins\GameHelper.java:174: error: cannot find symbol
ArrayList
Task :app:compileReleaseJavaWithJavac FAILED`
Please tell me what should I do?
Regards
Hi Alberto,
Huge thanks for responding over twitter and apologies for bugging you on social media.
My application has been working perfectly fine till I updated my platform to the latest ionic and cordova. One major change at the latest ionic is that it started using angular 8 so I am not sure if the issue has anything to do with that.
To replicate the issue:
1) Create a blank project by:
ionic start AndroidProject blank --cordova
2) Install the google-play-games-services by:
3) Build the project
ionic cordova build android --release --pro
Basically, this is a blank project with the cordova plugin. The build trows the following errors:
I tried to fix this with gradle as it seems to need a new dependency based on this page: https://developer.android.com/topic/libraries/support-library/packages
However, I have failed to do so. Please find the ionic info below:
Ionic:
Cordova:
Utility:
System:
I hope you can provide some pointers. I do appreciate your time and help on the matter and thanks again for responding to me.
Cheers,
Doug