제약레이아웃으로 Layout resource file생성이 안됩니다
조회수 732회
가이드라인을 생성하기 위해 root element에 android.support.constraint.ConstraintLayout 입력하고 생성했는데 위 사진과 같이 뜹니다. 찾아봤더니 모듈 차원의 gradle에 한 줄 추가하라길래 사진처럼 추가하고 Sync Project with Gradle Files 버튼 눌렀는데도 그대로입니다. 가이드라인 생성을 못해서 진행이 안됩니다 도와주세요..ㅠ
-
(•́ ✖ •̀)
알 수 없는 사용자
1 답변
-
그래들 의존성부분에 이미 컨스트레인트 레이아웃이 있습니다.
androidx.constraintlayout:constraintlayout:1.1.3
그런데 첫번째 사진에는 android...ConstraintLayout 이렇게 회색 배경에 글자가 보이네요. 레이아웃 xml의 텍스트 편집기 부분 가서
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> </androidx.constraintlayout.widget.ConstraintLayout>
androidx 관련해서 잘 들어갔나 확인해보세요.
아마 전 버전인 서포트레이아웃의 위젯을 사용하신것 같습니다.
댓글 입력