freshworks / mobihelp-android

MIT License
15 stars 13 forks source link

App crashing whenver I am trying to open conversations. #16

Closed devjon closed 9 years ago

devjon commented 9 years ago

Hi, My app is crashing whenever I am trying to open conversation. Here is the logcat:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.squad.run.debug/com.freshdesk.mobihelp.activity.FeedbackActivity}: android.view.InflateException: Binary XML file line #31: Error inflating class E/AndroidRuntime(27036): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2314) E/AndroidRuntime(27036): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388) E/AndroidRuntime(27036): at android.app.ActivityThread.access$800(ActivityThread.java:148) E/AndroidRuntime(27036): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292) E/AndroidRuntime(27036): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(27036): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime(27036): at android.app.ActivityThread.main(ActivityThread.java:5312) E/AndroidRuntime(27036): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(27036): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime(27036): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901) E/AndroidRuntime(27036): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696) E/AndroidRuntime(27036): Caused by: android.view.InflateException: Binary XML file line #31: Error inflating class E/AndroidRuntime(27036): at android.view.LayoutInflater.createView(LayoutInflater.java:633) E/AndroidRuntime(27036): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) E/AndroidRuntime(27036): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) E/AndroidRuntime(27036): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741) E/AndroidRuntime(27036): at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) E/AndroidRuntime(27036): at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) E/AndroidRuntime(27036): at android.view.LayoutInflater.inflate(LayoutInflater.java:504) E/AndroidRuntime(27036): at android.view.LayoutInflater.inflate(LayoutInflater.java:414) E/AndroidRuntime(27036): at android.view.LayoutInflater.inflate(LayoutInflater.java:365) E/AndroidRuntime(27036): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249) E/AndroidRuntime(27036): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106) E/AndroidRuntime(27036): at com.freshdesk.mobihelp.activity.FeedbackActivity.onCreate(Unknown Source) E/AndroidRuntime(27036): at android.app.Activity.performCreate(Activity.java:5953) E/AndroidRuntime(27036): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128) E/AndroidRuntime(27036): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267) E/AndroidRuntime(27036): ... 10 more E/AndroidRuntime(27036): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime(27036): at java.lang.reflect.Constructor.newInstance(Native Method) E/AndroidRuntime(27036): at java.lang.reflect.Constructor.newInstance(Constructor.java:288) E/AndroidRuntime(27036): at android.view.LayoutInflater.createView(LayoutInflater.java:607) E/AndroidRuntime(27036): ... 24 more E/AndroidRuntime(27036): Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 0 E/AndroidRuntime(27036): at android.content.res.TypedArray.getDrawable(TypedArray.java:747) E/AndroidRuntime(27036): at android.widget.ImageView.(ImageView.java:156) E/AndroidRuntime(27036): at android.widget.ImageView.(ImageView.java:145) E/AndroidRuntime(27036): at android.widget.ImageView.(ImageView.java:141)

tryprasannan commented 9 years ago

It looks like you are using a custom theme, when using a custom theme with Mobihelp SDK,

  1. Ensure the custom theme inherits from one of the variants of Theme.AppCompat
  2. The custom theme must also include the attributes(mhic*) from the equivalent Mobihelp theme. Eg. If the custom theme is a light theme, include the attributes from the equivalent Mobihelp theme Theme.MobihelpSDK.Light from res/values/themes.xml in your custom theme. The icons are based on these attributes.
devjon commented 9 years ago

Thanks the issue is resolved.