안드로이드 개발

android.content.ActivityNotFoundException 에러 간단 해결 방법

피커 2023. 1. 10. 19:17
728x90
반응형

안드로이드 앱을 개발하다보면 아래와 같이 에러가 발생하는 경우가 있습니다.

이때 간단히 해결하는 방법을 공유합니다.

 

1. 에러 

스택 트레이스 유형 android.content.ActivityNotFoundException 
android.content.ActivityNotFoundException
Exception android.content.ActivityNotFoundException:
  at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:2067)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1727)
  at android.app.Activity.startActivityForResult (Activity.java:5343)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:597)
  at android.app.Activity.startActivityForResult (Activity.java:5301)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:583)
  at com.picker.btsresemble.view.MainActivity$3.onClick (MainActivity.java:496)
  at androidx.appcompat.app.AlertController$AlertParams$3.onItemClick (AlertController.java:1068)
  at android.widget.AdapterView.performItemClick (AdapterView.java:330)
  at android.widget.AbsListView.performItemClick (AbsListView.java:1187)
  at android.widget.AbsListView$PerformClick.run (AbsListView.java:3179)
  at android.widget.AbsListView.onTouchUp (AbsListView.java:4109)
  at android.widget.AbsListView.onTouchEvent (AbsListView.java:3867)
  at android.view.View.dispatchTouchEvent (View.java:14350)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3160)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2802)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3166)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2816)

 

2. 해결방법

  -. AndroidManifest.xml에 정의된 Activity들과 android studio activity들이 제대로 매칭이 되는지 확인합니다.

3. 안드로이드 공식 답변

This exception is thrown when a call to Context#startActivity or one of its variants fails because an Activity can not be found to execute the given Intent.

반응형