Programming You need to use a Theme.AppCompat theme (or descendant) with this activity 오류해결 java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 다음과 같은 오류가 발생할땐 아래와 같이 해결한다 (Kotlin 기준) import 변경 import android.app.AlertDialog 아마 다음과 같이 잘못 되어있었을 것이다 import android.support.v7.app.AlertDialog 그럼에도 안된다면 다음과 같이 AlertDialog를 사용할 수 있도록 변경해보자 AlertDialog.Builder(this@MainActivity) Programming/Android 2022. 10. 31. LinearLayout에서 아이템 양쪽 정렬 배치 아이템과 아이템 사이에 다음 코드를 넣어주자 Programming/Android 2022. 10. 25. A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction 오류 해결 원인 및 분석 META-INF 파일에 따른 빌드오류가 발생하는 경우가 있다 아래와 같은 오류가 생겼으며, 해결방법은 알아냈지만 아직 원인이 무엇인지는 모르겠다 2 files found with path 'META-INF/AL2.0'. Adding a packagingOptions block may help, please refer to https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/dsl/ResourcesPackagingOptions for more information FAILURE: Build failed with an exception. * What went wrong: Execution faile.. Programming/Android 2022. 10. 25. 안드로이드 진동 울리기 (VIBRATE) 안드로이드에서 진동을 울리기 위해서는 VIBRATE 권한이 필요하다 AndroidManifest.xml에 다음 퍼미션을 추가해주자 다음으로, 진동을 울리게 하고 싶은 메소드에서 getSystemService를 이용해서 Vibrator를 불러와 사용한다. Java Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(1000); // 1초간 진동 Kotlin val vibrator: Vibrator = getSystemService(VIBRATOR_SERVICE) as Vibrator vibrator.vibrate(VibrationEffect.createOneShot(1000, 100)) Programming/Android 2022. 10. 24. Firebase로 Google Auth시 activityResult.resultCode:0 오류 해결방법 오류 : activityResult.resultCode는 0인데, Activity.RESULT_OK가 -1이어서 일치하지 않아 구글 로그인이 진행되지 않음 2022-10-21 23:09:16.998 7815-7815/com.ssafy.cleanstore D/LoginActivity: firebaseAuthWithGoogle: Activity.RESULT_OK): -1, activityResult.resultCode:0 원인 및 해결방법 : 구글 로그인 관련 설정이 모두 되지 않아서 그렇다. 다음 해결방법을 따라해보자 1. https://console.firebase.google.com/u/0/project/{프로젝트 ID}/authentication/providers 해당 경로로 가서 Authentica.. Programming/Android 2022. 10. 21. org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services'] was not found 오류해결 오류메세지 * Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (plugin dependency must include a version number for this source) at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResul.. Programming/Android 2022. 10. 21. 이전 1 2 다음