2

I know someone will respond this question as duplicate. Actually i already search and follow but still got error. In my emulator it working, but when i run in real device, i got that error. I already add dependencies which is
compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1'`

But still got error. I really don't know how to solve it. I also got this error.

Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class android.support.design.widget.CoordinatorLayout
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.
azizbekian
  • 60,783
  • 13
  • 169
  • 249
MAS. John
  • 582
  • 6
  • 22

1 Answers1

1

From the stacktrace you can see:

You need to use a Theme.AppCompat theme (or descendant) with the design library.

Which means, that you have set incorrect theme as your application/activity theme. It should be a descendant of a Theme.AppCompat.

Double check your themes.

azizbekian
  • 60,783
  • 13
  • 169
  • 249