Reference

dialog.show() 시 발생한 에러

android.view.WindowManager$BadTokenException: Unable to add window — token null is not for an application”

val builder: AlertDialog.Builder = AlertDialog.Builder(applicationContext)
builder.setMessage("message")
	.setTitle("title")
	.setNegativeButton(R.string.cancel, DialogInterface.OnClickListener{ dialog, id ->
		...
	})
    .setPositiveButton(R.string.ok, DialogInterface.OnClickListener{ dialog, id ->
	    ...
    })

val dialog:AlertDialog = builder.create()
dialog.show()

1행에서 AlertDialog.Builder(applicationContext)를 AlertDialog.Builder(this@MainActivity)로 수정하여 해결할 수 있습니다.

FIX 

가장 자주 사용되는 커밋 로그 중 하나로 'Fix'가 있습니다. 보통 올바르지 않은 동작을 고친 경우에 사용합니다.


Fix A  - A를 수정합니다
  • Fix stat cache
  • Fix changelog entry

Fix A in B - B의 A를 수정합니다.

가장 자주 사용되는 패턴입니다.

  • Fix calculation in process.uptime()
    • process.uptime()에 calculation을 수정합니다.
  • Fix build warning in node_report.cc
    • node_report.cc에 빌드 경고를 수정합니다.

Fix A which B , Fix A that B - B절인 A를 수정합니다.

'Fix A'로 끝낼 수 있으나 무엇을 수정한 것인지 상세하게 설명할 때 주로 사용합니다.

  • Fix incorrect type which makes animated gifs not loop forever on device
    • 디바이스에서 애니메이션 gif가 반복되지 않는 잘못된 타입을 수정합니다
  • Fix crash that happens when a component throws an exception that contains a null message
    • 컴포넌트가 null 메세지를 포함하는 예외를 발생시키는 경우 발생하는 충돌을 수정합니다

Fix A to B , Fix A to be B - B를 위해 A를 수정합니다

왜 수정하는지를 추가로 설명합니다

  • Fix inability to remove 'Disabled' state from AccessibilityStates
    • 'Disabled' 상태를 AccessibilityState에서 제거할 수 없는걸 수정합니다
  • Fix HTTP connection timeout callback to be appropriately called
    • 적당한 호출을 위해 HTTP 연결 시간 초과 콜백을 수정합니다

Fix A so that B - A를 수정해서 B가 되었습니다

'Fix A to B'와 의미는 비슷하나, 어감이 조금 다릅니다. 고쳐진 B의 상태가 강조됩니다.

  • Fix react-native init --help so that it doesn't return undefined
    • react-native init --help를 수정해서 정의되지 않은 상태로 반한되지 않습니다

Fix A where B - B처럼 발생하는 A를 수정했습니다

여기서 A는 보통 'issue', 'error', 'crash' 등이 들어가고 B는 문제가 발생한 모습을 적어줍니다.

  • Fix case where content of inline views didn't get relaid out
    • 인라인 뷰의 내용이 전달되지 않는 케이스 수정했습니다.

Fix A when B - B일 때 발생하는 A를 수정했습니다

A는 보통 'issue', 'error', 'crash' 등이 들어가고 B는 문제가 발생한 모습을 적어줍니다.

  • Fix crash when removing root nodes
    • 루트 노드를 제거할 때 발생하는 충돌을 수정했습니다
Reference

 

 

'Git' 카테고리의 다른 글

초간단 Git 사용법  (0) 2017.09.08
1.Git 시작하기  (0) 2017.08.30

+ Recent posts