728x90 Dialog2 [Error] IllegalArgumentException: View=DecorView not attached to window manager 에러 메시지 java.lang.IllegalArgumentException : View=DecorView@647f13a[MainActivity] not attached to window manager 문제 액티비티가 종료된 후 dismiss() 호출하는 경우 발생 class MainActivity : AppCompatActivity() { private var alertDialog: AlertDialog? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) alertDialog = AlertDialog.Builder(t.. 2021. 1. 11. [Error] WindowLeaked : Activity has leaked window DecorView that was originally added here 에러 메시지 WindowManager: android.view.WindowLeaked : Activity has leaked window DecorView@ac12e84[] that was originally added here 문제 다이얼로그를 띄운 후 액티비티가 종료되기 전까지 dismiss()를 호출해주지 않을 때 발생 class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) AlertDialog.Builder(this) .setTitle("JhDroid".. 2021. 1. 11. 이전 1 다음 728x90