0

My project Integrated Helpshift SDK. Before updated current version sdk v3.9.0, my app running ok. But this time I have falta exception. This is logcat:

E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-5111
    Process: my.packge.app, PID: 14498
    java.lang.NoClassDefFoundError: com.helpshift.util.HSTimeUtil
            at com.helpshift.HSApiClient.addAuth(HSApiClient.java:179)
            at com.helpshift.HSApiClient.access$100(HSApiClient.java:59)
            at com.helpshift.HSApiClient$1.run(HSApiClient.java:229)
            at java.lang.Thread.run(Thread.java:841)

Helpshift is Libs compiled. so I can't change it.

This's my build.gradle file

apply plugin: 'com.android.application'

android {

dexOptions {
    javaMaxHeapSize "4g"
    jumboMode = true
}
compileSdkVersion 21
buildToolsVersion '22.0.1'
defaultConfig {
    applicationId "my.package.app"
    minSdkVersion 19
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
    multiDexEnabled=true

}
packagingOptions {
    exclude 'META-INF/LICENSE.txt'
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
}

}
repositories {
mavenLocal()
mavenCentral()

}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.code.gson:gson:2.2.4'
compile 'joda-time:joda-time:2.3'
compile project(':HelpShift')
compile files('libs/gcm.jar')
}

Please help me fix this error. Thanks and best Regards.

Grokify
  • 15,092
  • 6
  • 60
  • 81
vinsDev
  • 3
  • 2

2 Answers2

0

Rather than building the HelpShift sdk as a project locally you can grab the latest version from the repository. Note that the Android v4 support library is also required:

dependencies {
    compile 'com.android.support:support-v4:21.0.+'
    compile 'com.helpshift:android-aar:3.9.0'
}

An example of this is in the HelpShift sample gradle build file on GitHub:

https://github.com/helpshift/helpshift-android-sdk-examples/blob/master/HelpshiftDemoGradle/app/build.gradle

Also take a look at the getting started guide which also lists how to include their sdk in gradle based builds.

BrentM
  • 5,671
  • 3
  • 31
  • 38
  • Thank @BrentM. I need change some text in Helpshift, so I had add project lib in my project. In dependencies, have compile project(':HelpShift'), this is helpshiftandroidsdk. My app running ok before I'd upgrade to current versionv 3.9.0. And i've this exception :( – vinsDev Jun 02 '15 at 04:52
  • Ok, Not sure if this will help, but HelpShift mention they require a targetSdkVersion of 21 (yours is 19) https://developers.helpshift.com/android/getting-started/#version-requirements – BrentM Jun 02 '15 at 05:23
  • I'd change to targetSdkVersion to 22, but I'd revert to old version and it working for me. Thanks for your time :) – vinsDev Jun 02 '15 at 08:25
  • And clean project before start run:( – vinsDev Jun 02 '15 at 10:03
0

I am Paranjay here from Helpshift.

As it is mentioned you can grab the latest version through gradle by adding these dependencies :

dependencies {
compile 'com.android.support:support-v4:21.0.+'
compile 'com.helpshift:android-aar:3.9.0'
}

And then you can set the SDK version requirement as mentioned here : https://developers.helpshift.com/android/getting-started/#version-requirements

You can report any problem or issues you are facing on our support email : support@helpshift.com.

This will ensure you a quick reply .

Thanks.

  • Hello friend I am Ganpat Kaliya, and I am using HelpShift FAQs. Can I remove Conversation or Chat Icon from HelpShift FAQs home screen ? Conversation or Chat icon only display on Question-Answer screen. Is it posible ? if yes, Then how ? please reply. Thanks in advanced. – Ganpat Kaliya Jan 04 '17 at 13:39