Unable to build the app after upgrading to version clevertap-android-sdk:2.0.5

120 views
Skip to first unread message

gou...@norocsolutions.com

unread,
Feb 1, 2016, 4:29:12 AM2/1/16
to CleverTap Support
Hey,

-> Problem: Unable to build my app after I upgrade to clevertap-android-sdk:2.0.5 using gradle dependency

What was I doing? 
-> Trying to upgrade WizRocket to Clever tap.

How?
Using the gradle dependency  'com.clevertap.android:clevertap-android-sdk:2.0.5'
->Error occurred only while I tried to build the app and not during gradle sync.

->Error message:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2

Any thoughts or solutions for the problem?

CleverTap Support

unread,
Feb 2, 2016, 12:51:35 AM2/2/16
to CleverTap Support
Hey Goutham,

Thanks for taking the time to upgrade.

Looks like it's an Android limitation, you've surpassed the DEX limit which is 65K methods in your application.

Here's an android guide on how you can handle apps with over max DEX : https://developer.android.com/tools/building/multidex.html

gou...@norocsolutions.com

unread,
Feb 2, 2016, 2:50:20 AM2/2/16
to CleverTap Support
Thank you for a timely response. 

Even I kind of figured out the single Dex file limitations and I am trying to avoid using multi Dex format as it has some known issues. With the goal of trying to stick to single dex file and import clever tap library as a gradle dependency I came up with a approach of using only the necessary libraries, which led me to the below questions.

Firstly, One of the gradle dependencies for Clever tap is 'com.google.android.gms:play-services:8.4.0', if you could give me details of only the specific libraries required from google play services we could add them separately instead of using the whole google play services library.

Secondly, I already have 'com.android.support:appcompat-v7:23.1.1' is it necessary to add 'com.android.support:support-v4:23.1.1' in my gradle dependency list? (I am assuming support-v7 also includes contents on support-v4)

Additionally, I was curious to know why do we need to add the below dependencies to the project
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'
If we manage to solve this issue without using a multidex format I believe it would be a great advantage for Clever Tap users.
Thank you again for the great assistance being provided.

CleverTap Support

unread,
Feb 2, 2016, 8:28:54 AM2/2/16
to CleverTap Support


Hi Goutham, 


We require following packages to build 

com.google.android.gms.gcm

com.google.android.gms.ads

com.google.android.ms.common


Support-v4 is a necessary dependency because of its extensive API support and however appcompat-v7 is built on top of v4 but is not include in v7 package. 


With regards to additional project level dependency you can ignore 'com.android.tools.build:gradle:2.0.0-alpha3’. However google service is required to support google play functionality in app. 


Hope it helps. Let us know how it goes. 


Regards

Reply all
Reply to author
Forward
0 new messages