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

Titanium sdk 6.0.0 support? #54

Open
mandelmonkey opened this issue Oct 28, 2016 · 46 comments
Open

Titanium sdk 6.0.0 support? #54

mandelmonkey opened this issue Oct 28, 2016 · 46 comments

Comments

@mandelmonkey
Copy link

Will this library be rebuilt for Titanium sdk 6.0.0 support?

@m1ga
Copy link
Contributor

m1ga commented Nov 1, 2016

there is already a PR: #44

@mandelmonkey
Copy link
Author

Thanks, I tried to build using the manifest but the following errors occured

ndk.build:
[copy] Copying 1 file to /Users/a/Documents/gcmpush/build/generated
[copy] Copying 1 file to /Users/a/Documents/gcmpush/build/generated/jni
[mkdir] Created dir: /var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated
[copy] Copying 9 files to /var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated
[exec] Android NDK: WARNING:jni/Android.mk:nl.vanvianen.android.gcm: non-system libraries in linker flags: -lkroll-v8 jni/Android.mk:35: warning: overriding commands for target /private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/KrollGeneratedBindings.cpp' [exec] jni/Android.mk:35: warning: ignoring old commands for target/private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/KrollGeneratedBindings.cpp'
[exec]
[exec] Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
[exec] Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
[exec] Android NDK: current module
[exec] jni/Android.mk:38: warning: overriding commands for target /private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/BootstrapJS.cpp' [exec] jni/Android.mk:38: warning: ignoring old commands for target/private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/BootstrapJS.cpp'
[exec] Android NDK: WARNING:jni/Android.mk:nl.vanvianen.android.gcm: non-system libraries in linker flags: -lkroll-v8
[exec] Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
[exec] Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
[exec] Android NDK: current module
[exec] [armeabi-v7a] Compile++ thumb: nl.vanvianen.android.gcm <= nl.vanvianen.android.gcm.GCMModule.cpp
[exec] warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]
[exec] In file included from jni/nl.vanvianen.android.gcm.GCMModule.cpp:12:
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:57:49: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
[exec] LOGE(tag, "Finished %s (%d ms)", description, AndroidUtil::getCurrentMillis() - start);
[exec] ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[exec] %ld
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:151:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:230:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:292:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:371:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:450:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:502:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:554:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:633:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:695:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:725:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:774:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:838:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:901:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:964:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] jni/nl.vanvianen.android.gcm.GCMModule.cpp:1026:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
[exec] LOGE(TAG, error);
[exec] ^~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] 17 warnings generated.
[exec] gperf -L C++ -E -t "/private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/KrollGeneratedBindings.gperf" > "/private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/KrollGeneratedBindings.cpp"
[exec] "python" "/Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/js2c.py" "/private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/BootstrapJS.cpp" "/private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/bootstrap.js"
[exec] [armeabi-v7a] Compile++ thumb: nl.vanvianen.android.gcm <= GcmBootstrap.cpp
[exec] warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]
[exec] In file included from jni/../GcmBootstrap.cpp:12:
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:57:49: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
[exec] LOGE(tag, "Finished %s (%d ms)", description, AndroidUtil::getCurrentMillis() - start);
[exec] ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[exec] %ld
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE'
[exec] #define LOGE(tag, ...) LOG(ERROR, tag, VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] /Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG'
[exec] #define LOG(level, tag, ...) android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS)
[exec] ^~~~~~~~~~~
[exec] In file included from jni/../GcmBootstrap.cpp:19:
[exec] /private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/KrollGeneratedBindings.gperf:13:8: error: forward declaration of struct cannot have a nested name specifier
[exec] struct titanium::bindings::BindEntry;
[exec] ^~~~~~~~~~~~~~~~~~~~
[exec] /private/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T/a/gcm-generated/KrollGeneratedBindings.gperf:24:11: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
[exec] register const char s = wordlist[key].name;
[exec] ^~~~~~~~~
[exec] 3 warnings and 1 error generated.
[exec] make: *
* [/var/folders/nv/r_25ssyx3k70hy55hrzghc2c0000gn/T//a/gcm-generated/obj/local/armeabi-v7a/objs/nl.vanvianen.android.gcm/__/GcmBootstrap.o] Error 1

BUILD FAILED
/Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/build.xml:347: The following error occurred while executing this line:
/Users/a/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/build.xml:302: exec returned: 2

@m1ga
Copy link
Contributor

m1ga commented Nov 16, 2016

Its compiling fine for me. Which android.platform version and ndk version are you using?

@mandelmonkey
Copy link
Author

I am quite inexperienced with these kind of things but here is my
build.properties

titanium.platform=/Users/a/Library/Application
Support/Titanium/mobilesdk/osx/6.0.0.GA/android
android.platform=/Users/a/Library/Android/sdk/platforms/android-24
google.apis=/Users/a/Library/Android/sdk/add-ons/addon-google_apis-google-22
android.ndk=/Users/a/Library/Android/sdk/ndk-bundle

ndk I downloaded the latest from android studio sdk manager

are you able to just send me the build?

On Thu, Nov 17, 2016 at 2:08 AM, Michael [email protected] wrote:

Its compiling fine for me. Which android.platform version and ndk version
are you using?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#54 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGRBN6i8iA3BZJucn2wvRqFJdUbB0cCAks5q-zh1gaJpZM4KjGZ2
.

@mandelmonkey
Copy link
Author

sorry to push with this but if you are able to send me a 6.0.0 build that would be great

@m1ga
Copy link
Contributor

m1ga commented Nov 19, 2016

sure: http://migaweb.de/nl.vanvianen.android.gcm-android-2.0.zip

@mandelmonkey
Copy link
Author

thank you!

On Sat, Nov 19, 2016 at 6:59 PM, Michael [email protected] wrote:

sure: http://migaweb.de/nl.vanvianen.android.gcm-android-2.0.zip


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#54 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGRBN97USigzjThFKssPCUczbm5BSsFGks5q_shlgaJpZM4KjGZ2
.

@mrkiley
Copy link

mrkiley commented Dec 13, 2016

@m1ga that link is giving me a corrupt zip file. Anything I need to do differently to grab it from you? @chris41188 did you do anything special to extract it?

@m1ga
Copy link
Contributor

m1ga commented Dec 13, 2016

@mrkiley sorry, I removed the file. Will upload it again later!

@mrkiley
Copy link

mrkiley commented Dec 13, 2016

Thanks @m1ga!

@m1ga
Copy link
Contributor

m1ga commented Dec 13, 2016

@mrkiley Link is working again!

@mrkiley
Copy link

mrkiley commented Dec 14, 2016

Thanks @m1ga!

@mrkiley
Copy link

mrkiley commented Dec 14, 2016

@m1ga, have you thought about forking it over to your github repo? Could save a lot of people trouble in the next few months of your modifications end up not getting merged anytime soon!

@sglok
Copy link

sglok commented Dec 16, 2016

Hi, I faced below error when using the latest nl.vanvianen.android.gcm-android-2.0.zip:

[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$1;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb;

What should I do to resolve it

@mrkiley
Copy link

mrkiley commented Dec 21, 2016

@sglok, looks like some sort of conflict. Are you sure you aren't adding the module twice somewhere?

@sglok
Copy link

sglok commented Dec 21, 2016

@mrkiley, Well, I switched back to ti sdk 5.5.1GA, I don't such issue. Btw, I have removed manually those duplicated class files and jar back. I encounter next problem, where below is the error:

[WARN] : Bundle: Key google.sent_time expected String but value was a java.lang.Long. The default value was returned.
[WARN] : Bundle: Attempt to cast generated internal exception:
[WARN] : Bundle: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String

I suspect in 2.0 is missing checking or changed:
Compare to 1.7:
if (value instanceof String && ((String) value).startsWith("{")) {....}

@jdbaculard
Copy link

With the version 2.0

This bug when onMessage event is fired :
Key google.sent_time expected String but value was a java.lang.Long. The default value was returned.

an idea ?

@talalmanaa
Copy link

android app crashes always on callback event using appcelerator ti sdk 6.0 along with your module. also doesn't receive push notification when app is closed.

@sglok
Copy link

sglok commented Dec 22, 2016

@talalmanaa If you further debug the android app crashes, i suspect that is same root cause as i faced.

@talalmanaa
Copy link

@sglok did you manage to resolve this issue ?

@sglok
Copy link

sglok commented Dec 22, 2016

@talalmanaa I need to learn how to compile the module. Unless author can help us to resolve it

@talalmanaa
Copy link

@m1ga kindly help us resolving app crashing issue on callback of version 2.0

@m1ga
Copy link
Contributor

m1ga commented Dec 22, 2016

I'll have a look at this soon!

@jdbaculard
Copy link

OK thanks !

Other issue, if I recompile this module with ant, there is this bug

BUILD FAILED
/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/build.xml:347: The following error occurred while executing this line:
/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/module/android/build.xml:302: exec returned: 2

My build properties :

titanium.platform=/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android
android.platform=/Users/xxx/Library/android-sdk-macosx/platforms/android-23
google.apis=/Users/xxx/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23
android.ndk=/Users/xxx/Library/android-ndk-r13b

Thanks

@m1ga
Copy link
Contributor

m1ga commented Dec 22, 2016

We are mixing many different errors in here. Perhaps we should separate them a bit to fix them.

@sglok @jdbaculard can you please provide the full error message of this bug (the line where it happens). The old fix #45 should be in 2.0 because I've used the latest code

@jdbaculard the build problem shouldn't be a bug but just a wrong configuration. For me it's compiling fine on my linux machine with the same android/ti folders (i don't have the ndk-link in my build.properties)

@talalmanaa can you provide any error for the crash?

@sglok
Copy link

sglok commented Dec 23, 2016

@m1ga I faced 2 problem:

  1. Duplicated classes loaded issue, I have no idea what is wrong:

[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$1;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb;
Solution: I removed those classes manually and jar back

  1. Java object casting error after fixed problem 1):

[WARN] : Bundle: Key google.sent_time expected String but value was a java.lang.Long. The default value was returned.
[WARN] : Bundle: Attempt to cast generated internal exception:
[WARN] : Bundle: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
[WARN] : Bundle: at android.os.BaseBundle.getString(BaseBundle.java:921)
[WARN] : Bundle: at nl.vanvianen.android.gcm.GCMIntentService.onMessage(GCMIntentService.java:98)
[WARN] : Bundle: at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:223)
[WARN] : Bundle: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
[WARN] : Bundle: at android.os.Handler.dispatchMessage(Handler.java:102)
[WARN] : Bundle: at android.os.Looper.loop(Looper.java:145)
[WARN] : Bundle: at android.os.HandlerThread.run(HandlerThread.java:61)
[WARN] : Bundle: Key google.sent_time expected String but value was a java.lang.Long. The default value was returned.
[WARN] : Bundle: Attempt to cast generated internal exception:
[WARN] : Bundle: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
[WARN] : Bundle: at android.os.BaseBundle.getString(BaseBundle.java:921)
[WARN] : Bundle: at nl.vanvianen.android.gcm.GCMIntentService.onMessage(GCMIntentService.java:106)
[WARN] : Bundle: at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:223)
[WARN] : Bundle: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
[WARN] : Bundle: at android.os.Handler.dispatchMessage(Handler.java:102)
[WARN] : Bundle: at android.os.Looper.loop(Looper.java:145)
[WARN] : Bundle: at android.os.HandlerThread.run(HandlerThread.java:61)
[ERROR] : AndroidRuntime: FATAL EXCEPTION: IntentService[GCMIntentService--2]
[ERROR] : AndroidRuntime: Process: -------------------, PID: 24509
[ERROR] : AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
[ERROR] : AndroidRuntime: at nl.vanvianen.android.gcm.GCMIntentService.onMessage(GCMIntentService.java:108)
[ERROR] : AndroidRuntime: at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:223)
[ERROR] : AndroidRuntime: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
[ERROR] : AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : AndroidRuntime: at android.os.Looper.loop(Looper.java:145)
[ERROR] : AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:61)

I suspect in 1.7 code is like below
if (value instanceof String && ((String) value).startsWith("{")) {....}

@m1ga
Copy link
Contributor

m1ga commented Dec 23, 2016

@sglok Thank you for the error log!
1)
are you using any other modules? E.g. Ti.GA? Normally these errors appear if you are using another module that has the google-playservices included

Could try to get the log from the android monitor and filter for tag:GCMIntentService. I'm interested in Log.d(LCAT, "Message key: \"" + key + "\" value: \"" + value + "\""); (gcmintentservice, line 99) part to see what it is trying to parse.
I've searched around and the instance of String should filter out null values and the error shouldn't occur.

@m1ga
Copy link
Contributor

m1ga commented Dec 23, 2016

@cr0ybot did another PR (#57) that might fix the 2. problem!

@sglok
Copy link

sglok commented Dec 25, 2016

@m1ga

  1. The problem is not happen if I am using ti SDK 5.5.1GA. Only happened when i switched to ti SDK 6.0.0GA. I didnt use any other google service api

  2. Below is the logcat:

D/GCMIntentService(31097): (IntentService[GCMIntentService--2]) [104358,178825] Push notification received
W/Bundle (31097): Key google.sent_time expected String but value was a java.lang.Long. The default value was returned.
W/Bundle (31097): Attempt to cast generated internal exception:
W/Bundle (31097): java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
W/Bundle (31097): at android.os.BaseBundle.getString(BaseBundle.java:921)
W/Bundle (31097): at nl.vanvianen.android.gcm.GCMIntentService.onMessage(GCMIntentService.java:98)
W/Bundle (31097): at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:223)
W/Bundle (31097): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
W/Bundle (31097): at android.os.Handler.dispatchMessage(Handler.java:102)
W/Bundle (31097): at android.os.Looper.loop(Looper.java:145)
W/Bundle (31097): at android.os.HandlerThread.run(HandlerThread.java:61)
D/GCMIntentService(31097): (IntentService[GCMIntentService--2]) [16,178841] Message key: "google.sent_time" value: "null"
W/Bundle (31097): Key google.sent_time expected String but value was a java.lang.Long. The default value was returned.
W/Bundle (31097): Attempt to cast generated internal exception:
W/Bundle (31097): java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
W/Bundle (31097): at android.os.BaseBundle.getString(BaseBundle.java:921)
W/Bundle (31097): at nl.vanvianen.android.gcm.GCMIntentService.onMessage(GCMIntentService.java:106)
W/Bundle (31097): at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:223)
W/Bundle (31097): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
W/Bundle (31097): at android.os.Handler.dispatchMessage(Handler.java:102)
W/Bundle (31097): at android.os.Looper.loop(Looper.java:145)
W/Bundle (31097): at android.os.HandlerThread.run(HandlerThread.java:61)

@jdbaculard
Copy link

Ok thanks. It works

I used ndk 11 and ti sdk 6.0.1

The jar compile but the zip file didn't generated --> doc issue. The error message :

dist:
[jar] Building jar: /Users/xxx/temp/gcmpush/dist/gcm.jar

post.jar:

python.set.exec:

python.check:
[echo] Testing for Python
[exec] Python 2.7.10

init:

pre.docgen:

docgen:
[exec] Traceback (most recent call last):
[exec] File "/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/module/builder.py", line 255, in
[exec] main(sys.argv)
[exec] File "/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/module/builder.py", line 194, in main
[exec] android_sdk = AndroidSDK(android_sdk_path)
[exec] File "/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/androidsdk.py", line 49, in init
[exec] self.set_api_level(api_level)
[exec] File "/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/androidsdk.py", line 53, in set_api_level
[exec] self.find_platform_dir()
[exec] File "/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/androidsdk.py", line 127, in find_platform_dir
[exec] old_style_dir = os.path.join(self.android_sdk, 'platforms', android_api_levels[api_level])
[exec] KeyError: 21

post.docgen:

check.respackage:

@+

@sglok
Copy link

sglok commented Jan 9, 2017

@m1ga any updates?

@m1ga
Copy link
Contributor

m1ga commented Jan 9, 2017

@sglok have you tried the other PR I've mentioned above?

@filianer
Copy link

Hi, I have de same error that @sglok

[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$1;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb;
[ERROR] 6 errors; aborting

ti.map module also include google.play.services

What would be the solution?

Thanks

@filianer
Copy link

It works now.
I modified google-play-services-gms.jar
steps:
1 - mv google-play-services-gms.jar google-play-services-gms.zip
2 - unzip google-play-services-gms.zip
3 - delete duplicate clases
4 - zip -r google-play-services-gms.zip com/ META-INF
5 - mv google-play-services-gms.zip google-play-services-gms.jar
6 - ant

@annakozy2011
Copy link

@m1ga, your file seems to miss the updates introduced into the main thread between 1.6 and 1.7 version, this is why it occasionally crashes with the issues same as in issues filed for 1.6 version (something like illegal argument exception when using startsWith on some string).

You should probably update the java code and then recompile.

As for play services.... ugh, well, I don't know about that, my play services are custom tailored anyway, so I did not notice all those errors :-/

@m1ga
Copy link
Contributor

m1ga commented Mar 27, 2017

Thanks @annakozy2011 I've just compiled the PR, it wasn't done by me 😄 But there is already fork which started from version 1.7 at: https://github.com/skypanther/gcmpush with a binary in the dist folder.

Perhaps that works better (and uses a "good" play service version)

@annakozy2011
Copy link

annakozy2011 commented Mar 28, 2017 via email

@mitulbhalia
Copy link

Hi All,

I am getting below error while compiling an app with this module.

Please let me know how can i solve this issue?

[ERROR] : TiApplication: (main) [61,1045] Sending event: exception on thread: main msg:java.lang.UnsatisfiedLinkError: dlopen failed: library "libstlport_shared.so" not found; Titanium 6.0.0,2016/11/13 01:23,undefined
[ERROR] : TiApplication: java.lang.UnsatisfiedLinkError: dlopen failed: library "libstlport_shared.so" not found
[ERROR] : TiApplication: at java.lang.Runtime.loadLibrary(Runtime.java:372)
[ERROR] : TiApplication: at java.lang.System.loadLibrary(System.java:1076)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:151)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:118)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:136)
[ERROR] : TiApplication: at com.mb.demofcm.DemofcmApplication.onCreate(DemofcmApplication.java:46)
[ERROR] : TiApplication: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
[ERROR] : TiApplication: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4741)
[ERROR] : TiApplication: at android.app.ActivityThread.access$1600(ActivityThread.java:153)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1408)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5451)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

@m1ga
Copy link
Contributor

m1ga commented May 22, 2017

The error you are reciving should be related to the sqlcipher module, not this one. Are you using that in your project?

@mitulbhalia
Copy link

@m1ga No, I am not using any other module. Right now i am making one demo app to test this module.

@mitulbhalia
Copy link

Anyone has solution?

@patakijv
Copy link

@jdbaculard, for the error you show in your post above (the KeyError: 21 in docgen) I found it to be resolved as a workaround if you install Android API Level 21 on your system (in my case I had cleaned up all but api level 23). The underlying problem appears to be that the build script from Titanium in the docgen section doesn't pass in the actual Android API level used in the module, rather it tries to use a default api level (which is set to 21 in 6.1.0.GA and probably all previous 6.x). That fails however if you don't have android-21 installed.

This is the line that is failing https://github.com/appcelerator/titanium_mobile/blob/a538fd552d0ba8317f174c27a631d01b46cafe64/support/android/androidsdk.py#L127 and it appears to be failing because the dictionary of api levels provided at the beginning of this file doesn't even include the default that is set (21).

If you install android-21 on your system, that line above won't be called because instead this line will return with a value https://github.com/appcelerator/titanium_mobile/blob/a538fd552d0ba8317f174c27a631d01b46cafe64/support/android/androidsdk.py#L125

The better fix really should be that the api level from the module get passed into the androidsdk scripts correctly and/or the dictionary of api levels should at least include the default value. Better yet it should be dynamic and if no acceptable values are found it should return a sensible error for the user building, instead of a python dictionary failure message.

Hope this helps.

@kassemitani
Copy link

@m1ga the link http://migaweb.de/nl.vanvianen.android.gcm-android-2.0.zip is not working :(

@m1ga
Copy link
Contributor

m1ga commented Jul 24, 2017

@kassemitani have a look at this fork: https://github.com/skypanther/gcmpush/tree/master/dist it has a 6+ version

@vasilestefirta
Copy link

vasilestefirta commented Sep 12, 2017

@m1ga 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! 👍

@vasilestefirta
Copy link

NVM. 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!

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