Kangho_Story

[안드로이드 코틀린 Kotlin] Missing Constraints in ConstraintLayout This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints 에러 해결 본문

Android

[안드로이드 코틀린 Kotlin] Missing Constraints in ConstraintLayout This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints 에러 해결

캉호 2024. 5. 1. 13:03
728x90
반응형

xml의 버튼에 빨간 줄이 생기면서 버튼 위치가 이상한 곳으로 가버리는 에러가 발생하였다.

버튼의 위치가 애매한 것이 문제였다.

버튼의 위치를 설정해주면 된다.

여러 방법이 있지만 쉬운 방법은

안드로이드 스튜디오 우측 상단의 Design을 눌러서 원하는 버튼의 위치를 조정해주면 된다.

 

그러면 자동으로 코드도 수정되면서 에러가 사라진다.

728x90
반응형
Comments