Program language/Android

안드로이드 스튜디오 다이얼로그 튕김 해결방법

COSMOSRKSI 2021. 10. 23. 14:18

final AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext()); 을

 

final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); 로 바꾼다.

 

그래도 동작하지 않는다면 final을 지우고 다시 빌드

 

 

 

 

 

 

 

출처: https://stackoverflow.com/questions/21814825/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity

 

You need to use a Theme.AppCompat theme (or descendant) with this activity

Android Studio 0.4.5 Android documentation for creating custom dialog boxes: http://developer.android.com/guide/topics/ui/dialogs.html If you want a custom dialog, you can instead display an Acti...

stackoverflow.com