afiz
afiz

Reputation: 11

Error compile apk in appcelerator

I try to compile apk using Appcelerator but i get this error and i using module ti.cloudpush. How to solve it.

Currently I'm using Titanium sdk: 5.2.0.GA

  [ERROR] :  Failed to run dexer:
  [ERROR] :  
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/LifecycleDelegate;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthUtil;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableAuthException;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthException;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GooglePlayServicesAvailabilityException;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableNotifiedException;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/UserRecoverableException;
  [ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/AccountPicker;
  [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

Here all the module that I used i the project

<modules>
    <module platform="commonjs">ti.cloud</module>
    <module platform="android">dk.napp.drawer</module>
    <module platform="android">ti.admob</module>
    <module platform="android">ti.ga</module>
    <module platform="android">ti.cloudpush</module>
</modules>

Thanks

Upvotes: 0

Views: 419

Answers (2)

Jason Priebe
Jason Priebe

Reputation: 508

Google play services is included in ti.cloudpush, ti.admob, and ti.ga. You have conflicting versions of the library.

My recommendation is to select one version of google-play-services.jar and forcibly replace the jar files in all the modules with this one version.

I actually copied the ti.cloudpush module into my project directory so that I can maintain it directly (and keep the proper version of google-play-services.jar checked into my source code repository).

I have not had any problem if I replace the jar file with a newer version. You can cross-reference your jar file versions against this document: http://www.smorgasbork.com/2015/01/05/google-play-services-sdk-version-history/

BTW -- there is another module available for google analytics. I have used https://github.com/Sitata/titanium-google-analytics with much success. I'm not sure what the difference is between that one and Ti.GA (although I think Ben Bahrenburg is a great Ti developer, so I might have to look into that one).

Upvotes: 3

Alberto Pastrolin
Alberto Pastrolin

Reputation: 156

Probably the problem is with the embedded google play services into cloudpush and admob, try to remove one of this module and see if it compile.

Upvotes: 1

Related Questions