마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

앱 테마 관련 에러 질문 [closed]

0 추천

Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

 

이 에러는 어떤걸 고쳐줘야하나요?

 

클래스는 현재

public class DBActivity extends AppCompatActivity 

이러헥 되어있고

 

검색해보니 styles.xml에 옵션을 주라고 해서 이거저거 다해봤는데 계속 이러네요ㅠ

<resources>

    <!--
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
    -->
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!--
            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.
        -->
    </style>

    <!-- Application theme. -->
    <style name="AppTheme" parent="AppBaseTheme">
        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
    </style>



</resources>

매니페스트에서는 해당액티비티에

android:theme="@style/AppTheme" 

 

 

추가ㅐ놓았습니다.

어디가 문제인가요?

질문을 종료한 이유: 해결
브루스웨인 (8,580 포인트) 님이 2017년 7월 12일 질문
브루스웨인님이 2017년 7월 18일 closed
AppTheme 의 페어런츠가 컴펫이 아닌듯하네요
...