[Android] 앱 테마 상속 오류

PanaxW·2021년 8월 16일
0

Error 해결

목록 보기
1/5

앱 테마 상속 오류

The style on this component requires your app theme to be Theme.MaterialComponents

액티비티가 MaterialComponents가 아닌 AppCompat을 사용하는 경우, Material Components의 요소를 사용하면 발생하는 오류

해결

  1. AndroidManifest에서 컴포넌트를 사용할 액티비티의 Theme 속성을 MaterialComponent로 지정
  2. style에서 AppTheme의 parent를 MaterialComponents로 변경

기타

App theme 프로젝트를 사용하다가 MaterialComponents 프로젝트로 변경할 경우 Bridge Theme를 사용해야 함

참고

머티리얼 디자인 가이드

profile
Android Developer

0개의 댓글