https://start1a.tistory.com/52?category=822910
[안드로이드] Error inflating class com.google.android.material.card.MaterialCardView 해결
1. android:layout_width="match_parent" android:layout_height="wrap_content" app:cardCornerRadius="8dp" android:theme="@style/Theme.MaterialComponents.Light" app:cardElevation="8dp"> 2. A..
start1a.tistory.com
"Error inflating class com.google.android.material.card.MaterialCardView " 해당 에러가 뜨면서 실행이 불가능.
무슨 Binary xml #40 어쩌구 이렇게 뜸.
위 블로그에 언급됐듯이
현재 Activity의 style의 theme와 cardView에서 사용하는 style의 테마가 다르면 에러가 남.
내 프로젝트의 cardView는 material theme를 사용하고 있고 Activity는 AppCompat 을 사용하고 있었음. 따라서 Activity의 Theme를 MaterialComonents로 바꿔줌.
이렇게 해결.