반응형

1. 에러 메세지

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


2. 해결방법


 (1) style.xml

    <!-- Base application theme. -->

    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">

        <!-- Customize your theme here. -->

        <item name="colorPrimary">@color/rgb_33cbcc</item>

        <item name="colorPrimaryDark">@color/rgb_33cbcc</item>

        <item name="colorAccent">@color/rgb_33cbcc</item>

        <item name="android:windowNoTitle">true</item>

    </style>


 (2) code

ContextThemeWrapper ctx = new ContextThemeWrapper(this, R.style.AppTheme);

        arcMenu =  (ArcMenu) LayoutInflater.from(ctx)

                .inflate(R.layout.activity_top_screen_menu, null);


3. 원인

  Service 단 혹은 code에서 외부 라이브러리로 레이아웃을 추가 중, 위와 같은 에러 메세지가 발생했다.

  Service에서 레이아웃을 추가하려면 별도의 Theme를 지정해주면서 layout을 가져와야한다.

  

반응형