에러
213
投稿した質問数 5
Unable to start activity ComponentInfo{com.cartris.a1201_draw_layout/com.cartris.a1201_draw_layout.DrawLayoutActivity}: android.view.InflateException: Binary XML file line #15 in com.cartris.a1201_draw_layout:layout/activity_draw_layout: Binary XML file line #19 in com.cartris.a1201_draw_layout:layout/content_draw_layout: Error inflating class fragment
이런 에러가 뜹니다 왜 그런걸까요??
activity_draw_layout 에 있는 코드 내용은 아래와 같습니다
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
android:id="@+id/app_bar_draw_layout"
layout="@layout/app_bar_draw_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_draw_layout"
app:menu="@menu/activity_draw_layout_drawer" />
</androidx.drawerlayout.widget.DrawerLayout>
content_draw_layout 에 있는 코드 내용은 아래와 같습니다
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/app_bar_draw_layout">
<fragment
android:id="@+id/nav_host_fragment_content_draw_layout"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
回答 1
0
1번 에러를 보고 content_draw_layout에서 <fragment 를 <androidx.fragment.app.FragmentContainerView로 변경했는데 그 이후에
1번 에러를 보고 content_draw_layout에서 <fragment 를 <androidx.fragment.app.FragmentContainerView로 변경했는데 그 이후에 does not have a NavController set on 2131231021
이런 에러가 또 납니다..
패키지 구분에 대해 궁금한게 있습니다
0
6
1
툴바 타이틀 폰트 설정하는거 어떻게 하나요...
0
357
1
버튼에 백그라운드 이미지 설정 후 클릭 시 이벤트 처리
0
447
1
액션바를 제거하고 버튼으로 배치해서 옵션 메뉴를 구성하고 싶습니다
0
412
1
갤러리에서 이미지 가져오기가 안됩니다.
0
509
1
getExternalStoragePublicDirectory() 안드로이드 10
0
1003
3
디렉토리
0
285
4
썸네일
0
246
1
강의ppt공유가능하실까요
0
173
1
소스코드 마지막강좌에 게시부탁드립니다
0
190
1
리스트 뷰 네트워크 동기 할때 오류 관련 질문 드립니다.
0
311
1
네트워크가 다를경우 서버와접속이 불가능한가요?
0
219
2
getPackagename()함수가 작동 안할때 가 있을까요.
0
225
1
쓰레드 질문 입니다.
0
354
4
강좌 순서에서 맨 마지막 소스코드들어가봤는데 파일이 없습니다.
0
256
2
전역변수를 클레스 매서드에서 사용할때.
0
295
2
액션바 커스터 마이징 할때 한 다음에 여기에 팝업메뉴 추가 가능한가요...
0
211
2
해결안되는 에러.. Failed to find configured root that contains /null/
0
2580
2
manifest에 프로바이더 네임 이 바꼈다고 합니다.
1
726
1
post방식으로 배열 데이터 넘길때 질문 입니다.
0
743
2
16:47 부분에 질문 있습니다.
0
185
1
getExternalStorageDirectory 함수가 없어요
0
286
1
E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted
0
715
1
영상이 잘못올라왔네요
0
111
1

