0

This is the error that I get:

05-09 11:55:10.559: E/AndroidRuntime(15809): java.lang.NoSuchFieldError: No static field Smooch_inputText of type I in class Lio/smooch/ui/R$id; or its superclasses (declaration of 'io.smooch.ui.R$id' appears in /data/app/nl.hgrams.passenger-1/base.apk)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at io.smooch.ui.fragment.ConversationFragment.onCreateView(Unknown Source)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at io.smooch.ui.ConversationActivity.onStart(Unknown Source)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.Activity.performStart(Activity.java:6268)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.ActivityThread.-wrap11(ActivityThread.java)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.os.Handler.dispatchMessage(Handler.java:102)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.os.Looper.loop(Looper.java:148)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at android.app.ActivityThread.main(ActivityThread.java:5417)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at java.lang.reflect.Method.invoke(Native Method)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-09 11:55:10.559: E/AndroidRuntime(15809):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

This is how I init in the Application class:

   public void initSmooch() {
    Smooch.init(this, "c1th4qtm5o1qlm92esacfc6ow");
    UserRecord userRecord = PSUserService.getInstance(PSLocationCenter.this).getMyUser();
    if(userRecord != null) {
        User.getCurrentUser().setFirstName(userRecord.getFirst_name());
        User.getCurrentUser().setLastName(userRecord.getLast_name());
        User.getCurrentUser().setEmail(userRecord.getEmail());
        final Map<String, Object> customProperties = new HashMap<>();
        customProperties.put("country", userRecord.getCountry());
        customProperties.put("language", userRecord.getLanguage());
        customProperties.put("id", userRecord.getId());
        customProperties.put("email", userRecord.getEmail());
        User.getCurrentUser().addProperties(customProperties);
    }
}

And I used version:

    compile 'io.smooch:core:latest.release'
compile 'io.smooch:ui:latest.release'

My button only does this:

     ConversationActivity.show(this);
rosu alin
  • 5,674
  • 11
  • 69
  • 150

2 Answers2

1

A new version of the SDK has been released (2.3.1) which fixes the problem.

  • Still crashes with this: compile 'io.smooch:core:latest.release' compile 'io.smooch:ui:latest.release' Will try with 2.3.1 (fixed versioning nr) – rosu alin May 09 '16 at 15:31
0

Thanks to RRR , I found this: https://github.com/smooch/smooch-android/issues/22 which states that they launched a faulty version and it will work if u user 2.2.0 instead of the latest release

rosu alin
  • 5,674
  • 11
  • 69
  • 150