[tip]테마관련 error (you need to use a theme.appcompat theme (or descendant) with this activity)
메인 에러:
you need to use a theme.appcompat theme (or descendant) with this activity
상황:
SplashActivity를 이용하려는데 actionbar를 없애기위해
android:theme="@android:style/Theme.NoTitleBar"
manifest에 위와 같은 코드 추가후
android support.v7.appcompat 관련 에러가 발생.
해결:
2014 년 8 월기준 모든 라이브러리및 관련sdk를 모두 설치하였다면, android.support.v7.appcompat 라이브러리가 있을 것임.
고녀석은 .java파일에서. extends를 Activity 가아닌 ActionBarAcivity를 가지게됨.
다음과 같이
import android.support.v7.app.ActionBarActivity;
public class SplashActivity extends ActionBarActivity {
고로 ActionBarAcvitivy를 Acitivy로 바꿔준다면 손쉽게 해결!
이유??
아마 저 라이브러리는 액션바가 메인인 라이브러리같은데.. hide가 안되나봄..
자세한건 조금더 살펴봐야할 듯.
*****추가 . extends를 Activity로 사용하지 않을 경우가 분명이있다.
그럴경우 해당 manifest에서 해당 activity에 다음과 같이 추가해준다
android:theme="@style/Theme.AppCompat"
'Android' 카테고리의 다른 글
[tip]테마관련2 error (you need to use a theme.appcompat theme (or descendant) with this activity) (0) | 2014.11.10 |
---|---|
[Activity BackGround] 액티비티에 백그라운드 입히는 2가지방법. (0) | 2014.11.07 |
[Alarm Intent] Receiver에서 Intent를 이용해 알람 화면 띄우기! (0) | 2014.09.02 |
[tip]클린 후 R.java 파일이 사라지는 현상 (0) | 2014.08.31 |
[apkUploaad error] 안드로이드 마켓에 앱올릴 때. (0) | 2013.05.22 |
Recent Comments