다음 클래스를 찾을 수 없습니다 : android.support.v7.internal.app.WindowDecorActionBar
Android Studio의 레이아웃 미리보기에서 다음 오류가 발생하는 원인은 무엇입니까?
렌더링 문제 다음과 같은 클래스를 찾을 수 없습니다.-android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class) 팁 : 프로젝트를 빌드하십시오.
작업 표시 줄은 더 이상 사용되지 않으며 툴바로 대체되었습니다. 지금 당장 Actionbar를 계속 사용하려면 다음을 수행 할 수 있습니다.
- res 폴더 안의 values 폴더에서 styles.xml을여십시오.
- "Base.Theme.AppCompat.Light.DarkActionBar"가 표시되도록 테마 이름의 시작 부분에 Base 단어를 추가하십시오.
나는 오늘 같은 문제가 있었고이 솔루션은 나를 위해 일했다. 참고로 Android Studio에 있지만이 솔루션은 Eclipse와 비슷합니다.
참고로 여기에 준비가되었을 때 액션 바를 툴바로 대체하는 괜찮은 블로그 게시물이 있습니다 : https://blog.xamarin.com/android-tips-hello-toolbar-goodbye-action-bar/
나는 당신 "com.android.support:appcompat-v7:23.1.1"
이 당신의 module
설정 에 의존해야한다고 생각합니다 .
ActionBar
더 이상 사용되지 않습니다.
"build.gradle" 에서 의존성을 'com.android.support:appcompat-v7:23.1.1'
로 변경하십시오 .'com.android.support:appcompat-v7:23.0.1'
스타일 부모를로 변경할 수도 있습니다 "Theme.AppCompat.Light.NoActionBar"
.
Toolbar
대신 대신 사용하십시오 ActionBar
.
이것은 나를 위해 작동
res / values / styles.xml에서 AppTheme 부모를 변경하면이 문제가 해결되었습니다. 바꾸다
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
와
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
또는 API 레벨 21 을 목록에서 변경할 수 있습니다 .
이동 : res-> 값-> 스타일 (V21)->
암호
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
미리보기Apptheme.NoActionBar
에서 테마를 선택하십시오 . 지원 이 중단 되었으므로 에 오신 것을 환영합니다 . 의 종속성을 변경할 필요가 없습니다 . 에서 까지 .ActionBar
ToolBar
build.gradle(Module:app)
com.android.support:appcompat-v7:23.1.1
com.android.support:appcompat-v7:23.0.1
희망이 당신을 도울 것입니다!
나는 비슷한 문제가 있었고 ActionBar가 더 이상 사용되지 않기 때문에 많은 사람들이 말한 것처럼 트릭을 지정하는 것이 었습니다
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
참고 : 부모는 .NoActionBar로 끝납니다.
ActionBar는 더 이상 사용되지 않으므로 Android는 ToolBar를 사용하여 개발자 에 대해 읽을 수 있습니다 .android.com
나는 지정을 시도했다
<style name="AppTheme.NoActionBar">
다른 게시물에서 언급했듯이 오류가 발생했습니다. 다른 사람들에게는 그 문제가 없을 수도 있습니다.
I have the same problem in Android Studio 1.5 (even with AppCompatActivity), and my attempt to solve the problem was to update my Android Studio to 2.0. It solves the problem in my case. You can found the link download in: http://tools.android.com/download/studio/canary/latest
thanks @joshgoldeneagle, worked in AS v1.4 for me. also effective in AS is to open "build.gradle (Module.app)" and change version from v7.23.1.1 to v7.23.0.1 -hth
Quick fix
Select a theme with no AtcionBar in UI Preview Tool
You will need to change the api rendering level to 17, there may be rendering problem with higher level apis, might be higher level apis suppose to have a default theme, and hope you are not specified none.
AS v1.4의 경우 styles.xml 폴더의 Theme.AppCompat.Light.DarkActionBar 앞에 "Base"를 추가하면 문제가 해결되었습니다.
또한 AS v2.1로 업데이트하면 문제가 해결되었습니다. 공동 작업자와 AS 버전에 따라 더 나은 방법이 있습니다.
res / values / styles.xml에서 AppTheme은 다음과 같습니다.
로 변경 :-
"베이스"를 추가하면 렌더링 문제가 해결됩니다.
매니페스트에서 테마를 변경하면 내 문제가 해결되었습니다.
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
'IT박스' 카테고리의 다른 글
프로그래밍 방식으로 탐색 모음의 UIBarButtonItem? (0) | 2020.07.22 |
---|---|
TextView.setTextSize가 비정상적으로 작동 함-다른 화면에 대해 textview의 텍스트 크기를 동적으로 설정하는 방법 (0) | 2020.07.22 |
EJB 3.1과 CDI는 어디에 사용합니까? (0) | 2020.07.22 |
Qt Creator-프로젝트 오류 : Xcode가 올바르게 설정되지 않았습니다. (0) | 2020.07.22 |
치명적인 오류 : AST 파일이 잘못되었거나 손상되었습니다.-Xcode (0) | 2020.07.22 |