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

no compile sdK 6.1.1 #61

Open
necrocyber opened this issue Aug 7, 2017 · 10 comments
Open

no compile sdK 6.1.1 #61

necrocyber opened this issue Aug 7, 2017 · 10 comments

Comments

@necrocyber
Copy link

this error please

[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmListenerService;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmListenerService$1;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmListenerService$2;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmNetworkManager;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmPubSub;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmReceiver;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmTaskService;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GcmTaskService$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/gcm/GoogleCloudMessaging;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
[ERROR] : at com.android.dx.command.dexer.Main.runMultiDex(Main.java:368)
[ERROR] : at com.android.dx.command.dexer.Main.runDx(Main.java:289)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:247)
[ERROR] : at com.android.dx.command.Main.main(Main.java:94)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
[ERROR] : ... 4 more

@mcvendrell
Copy link

mcvendrell commented Aug 8, 2017

Coming to say the same:

Ti SDK 6.1.2 and I get this error:
08-08 12:42:41.679: E/AndroidRuntime(3078): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1962]: 101 could not load needed library 'libstlport_shared.so' for 'libnl.vanvianen.android.gcm.so' (load_library[1117]: Library 'libstlport_shared.so' not found)

@mcvendrell
Copy link

I will autorespond: there is a fork updated with 6.x

https://github.com/skypanther/gcmpush/tree/master/dist

@vasilestefirta
Copy link

@mcvendrell The module from the link you've provided works just fine w/ Ti SDK 6+, however I'm experiencing an issue when the Push Notification does not show up when the app is closed/background (even if I can see some console logs regarding that the push notification message was received). Do you know by chance what can cause that problem? Thanks! 👍

@mcvendrell
Copy link

Hi @vasilestefirta . I have no issues with this module. Works well for me, no matter if app is closed or backgrounded.
Just be sure that the expected payload from the server is right (if you are building the payload manually)

@vasilestefirta
Copy link

@mcvendrell thanks for confirming that! May I ask you if you generated the GCM api key using the Google Developers Console or Firebase Cloud Messaging console (which is a replacement for GCM, you can see the alert message on this page - https://developers.google.com/cloud-messaging/) ?

I created my GCM key using Firebase console and I wonder if that's the problem, since I saw an open issue regarding FCM support for this module:

#50

@mcvendrell
Copy link

I used the new FCM

@vasilestefirta
Copy link

Interesting! Do you mind sharing your implementation for gcm.registerPush() method and your <android>...</android> section from your project's tiapp.xml file? I would really appreciate that! 🙏

@mcvendrell
Copy link

Of course, nothing special (GCMsender... is the name for the FCM id):

gcm.registerPush({ senderId: Alloy.CFG.GCMsenderNotifId, notificationSettings: { smallIcon: 'notify.png', // Place icon in platform/android/res/drawable/ largeIcon: 'notify.png', // Same vibrate: true, // Whether the phone should vibrate sound: 'default', }, success: deviceTokenSuccess, // Success returns event.registrationId error: deviceTokenError, // Error returns event.error callback: receivePushMessage // Callback returns event.data });

And nothing in the tiapp.xml, this module doesn't need it.

@vasilestefirta
Copy link

vasilestefirta commented Sep 12, 2017

@mcvendrell Thanks! It looks like the issue was happening because of the data I was sending from the server. I was sending text instead of message 🙂 Fixed it and now it works just fine!

@mcvendrell
Copy link

@vasilestefirta that's why I warn about be sure on the payload. Excellent.

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

No branches or pull requests

3 participants