Pushwoosh / pushwoosh-appcelerator-titanium

Other
33 stars 16 forks source link

Registration Problem #10

Closed jdupuis closed 8 years ago

jdupuis commented 8 years ago

Hi,

I updated the pushwoosh module in my project and now, I have problems (all works fine before but now i need the Android 6 and iOS 9 support). When I compile the app, the build doesn't work when I have the file /lib/google-play-services.jar in my project. Here the error :

[ERROR] : Failed to run dexer: [ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zza; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzb; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zza$7; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zza$5; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzd$zza$zza; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzg$zza; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zza$2; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzd; [ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzd$zza; [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:608) [ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311) [ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:277) [ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245) [ERROR] : at com.android.dx.command.Main.main(Main.java:106) [ERROR] : Caused by: java.lang.InterruptedException: Too many errors [ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600) [ERROR] : ... 4 more TRACE | titanium exited with exit code 1 ERROR | Error: ti run exited with error code 1 at ChildProcess. (/Users/user1/.appcelerator/install/5.0.4/package/node_modules/appc-cli-titanium/plugins/run.js:92:66) at ChildProcess.emit (events.js:110:17) at Process.ChildProcess._handle.onexit (child_process.js:1074:12) TRACE | Sending exit signal to titanium process: 44464 [ERROR] Application Installer abnormal process termination. Process exit value was 1

So I removed the google play services files.

Now, the build works but an error occured when I want to registred a device, and the application crashed.

Here the errors :

[INFO] : ###retrievePushDeviceToken [INFO] : Pushwoosh: Log level: NOISE [INFO] : Pushwoosh: [PushManager] App ID: XXXXX-XXXXX [INFO] : Pushwoosh: [PushManager] Project ID: XXXXXXXXXXXXX [INFO] : Pushwoosh: [PushManager] This is android device [WARN] : Pushwoosh: [RequestManager] Try To sent: registerUser [WARN] : Pushwoosh: [RequestManager] Pushwoosh Request: {"request":{"v":"3.1.13.594","device_type":3,"application":"XXXXX-XXXXX","hwid":"a33cdsfsdff6c433c8b8a3","userId":"a33cf6c433fdsfsdfdc8b8a3"}} [WARN] : Pushwoosh: [RequestManager] Pushwoosh Request To: https://cp.pushwoosh.com/json/1.3/registerUser [ERROR] : TiApplication: (IntentService[GCMRegistrationService]) [7,104782] Sending event: exception on thread: IntentService[GCMRegistrationService] msg:java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/iid/InstanceID;; Titanium 5.0.2,2015/09/30 12:07,92c2265 [ERROR] : TiApplication: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/iid/InstanceID; [ERROR] : TiApplication: at com.pushwoosh.GCMRegistrationService.register(Unknown Source) [ERROR] : TiApplication: at com.pushwoosh.GCMRegistrationService.onHandleIntent(Unknown Source) [ERROR] : TiApplication: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] : TiApplication: at android.os.HandlerThread.run(HandlerThread.java:61) [ERROR] : TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.iid.InstanceID" on path: DexPathList[[zip file "/data/app/com.tourismepaysdenexon.appmobile-2/base.apk"],nativeLibraryDirectories=[/data/app/com.tourismepaysdenexon.appmobile-2/lib/arm, /vendor/lib, /system/lib]] [ERROR] : TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) [ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) [ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) [ERROR] : TiApplication: ... 6 more [ERROR] : TiApplication: Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.iid.InstanceID [ERROR] : TiApplication: at java.lang.Class.classForName(Native Method) [ERROR] : TiApplication: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) [ERROR] : TiApplication: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) [ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) [ERROR] : TiApplication: ... 7 more [ERROR] : TiApplication: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

Somebody can help me? (I'm with all the latest releases of Appcelerator platform components - Appcelerator Studio 4.3.3, Titanium SDK 5.0.2, Appcelerator CLI 5.0.4, etc.., with android API 23)

Thanks a lot.

Julien

shaders commented 8 years ago

You must have some other plugins added that is using old Google Play Services library. That's why you have conflicts on dexer, that's why your app crashes with missing InstanceID method.

Keep Google Play Services library provided by Pushwoosh and remove it from the other modules.