본문 바로가기
728x90

개발/Android Error7

[Error] Dependent features configured but no package ID was set. 에러 메시지 Dependent features configured but no package ID was set. 문제 라이브러리 모듈에서 gradle - plugin 을 `application`으로 설정한 경우 발생 plugins { id 'com.android.application' } // or apply plugin: 'com.android.application' 해결 라이브러리 모듈의 gradle - plugin을 `library` 로 변경 plugins { id 'com.android.library' } // or apply plugin: 'com.android.library' * 글에 틀린 부분이 있으면 댓글 부탁드립니다 :D 2021. 3. 18.
[Error] JVM target 1.6. Please specify proper '-jvm-target' option 에러 메시지 Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option 문제 작성자는 EncryptSharedPreference 사용할 때 발생 encryptPref?.edit { //error in edit function ... } 해결 코틀린 컴파일러의 JVM 타깃이 맞지 않아서 발생하는 오류 App Gradle에 다음과 같은 설정을 추가해주면 해결 안드로이드 스튜디오 최신버전의 경우 새로운 프로젝트를 생성하면 이미 선언되어 있음 android { ... compileOptions { sourceC.. 2021. 3. 8.
[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.
[Error] Fatal Exception: android.app.RemoteServiceException Bad notification for startForeground 에러 메시지 Fatal Exception: android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification 문제 Oreo(26) 버전부터 startForeground() 함수로 Notification을 띄울 때 Notification Channel을 생성하지 않고 Noti를 띄울 때 발생하는 에러 작성자는 Notification Channel을 생성하고 있지만 해당 문제가 발생했음 해결 Notification Channel을 생성하고 있지 않다면 private val NOTIFICATION_.. 2021. 1. 5.
[Error] Expectiong android:screenOrientation="unspecified" or "fullSensor" 에러 메시지 Expectiong android:screenOrientation="unspecified" or "fullSensor" for this activity so the user can use the application in any orientation and provide a greate experience on Chrome OS devices 문제 Android Studio 3.6.0 업데이트 이후 발생 해결 이번 문제는 사용자 경험을 위한 Lint 경고로 아래 방법 중 프로젝트에 맞는(원하는) 방법을 사용하면 된다 방법 1 : AndroidMenifest에 ignore 설정 방법 2 : AndroidMenifest 의 screenOrientation 설정 변경 단, 이 경우 가로, 세로 화.. 2021. 1. 5.
728x90