1. ホーム
  2. Android

Android 開発の問題点:ActivityNotFoundException: 明示的なアクティビティクラスを見つけることができません

2022-02-18 11:28:14
Android 2.3.3  
Eclipse Version: 3.7.0  
LogCat  






LogCatのエラー報告。

02-03 15:52:46.363: INFO/ActivityManager(61): Starting: Intent { flg=0x10000000 cmp=com.tao.iphone4s/.Start } from pid 736  
02-03 15:52:46.405: DEBUG/AndroidRuntime(736): Shutting down VM   
02-03 15:52:46.405: WARN/dalvikvm(736): threadid=1: thread exiting with uncaught exception (group=0x40015560)   
02-03 15:52:46.405: ERROR/CrashHandler(736): Unable to start receiver com.tao.iphone4s.BootBroadcastReceiver: android.content. ActivityNotFoundException: Unable to find explicit activity class {com.taobao.iphone4s/com.taobao.iphone4s.Start}; have you declared this activity in your AndroidManifest.xml?   
02-03 15:52:46.672: DEBUG/CrashHandler(736): BOARD : unknown   
02-03 15:52:46.672: DEBUG/CrashHandler(736): BOOTLOADER : unknown   
02-03 15:52:46.672: DEBUG/CrashHandler(736): BRAND : generic   
02-03 15:52:46.672: DEBUG/CrashHandler(736): CPU_ABI : armeabi   
02-03 15:52:46.672: DEBUG/CrashHandler(736): CPU_ABI2 : unknown   
02-03 15:52:46.672: DEBUG/CrashHandler(736): DEVICE : generic   
02-03 15:52:46.683: DEBUG/CrashHandler(736): DISPLAY : sdk-eng 2.3.3 GRI34 101070 test-keys   
02-03 15:52:46.683: DEBUG/CrashHandler(736): FINGERPRINT : generic/sdk/generic:2.3.3/GRI34/101070:eng/test-keys   
02-03 15:52:46.683: DEBUG/CrashHandler(736): HARDWARE : goldfish   
02-03 15:52:46.683: DEBUG/CrashHandler(736): HOST : android-test-26.mtv.corp.google.com   
02-03 15:52:46.693: DEBUG/CrashHandler(736): ID : GRI34   
02-03 15:52:46.693: DEBUG/CrashHandler(736): MANUFACTURER : unknown   
02-03 15:52:46.703: DEBUG/CrashHandler(736): MODEL : sdk   
02-03 15:52:46.703: DEBUG/CrashHandler(736): PRODUCT : sdk   
02-03 15:52:46.712: DEBUG/CrashHandler(736): RADIO : unknown   
02-03 15:52:46.712: DEBUG/CrashHandler(736): SERIAL : unknown   
02-03 15:52:46.712: DEBUG/CrashHandler(736): TAGS : test-keys   
02-03 15:52:46.712: DEBUG/CrashHandler(736): TIME : 1296773036000  
02-03 15:52:46.712: DEBUG/CrashHandler(736): TYPE : eng   
02-03 15:52:46.712: DEBUG/CrashHandler(736): UNKNOWN : unknown   
02-03 15:52:46.724: DEBUG/CrashHandler(736): USER : android-build   
02-03 15:52:49.905: INFO/Process(736): Sending signal. pid: 736 sig: 9  
02-03 15:52:49.924: INFO/ActivityManager(61): Process com.taobao.iphone4s (pid 736) has died.   
02-03 15:52:49.924: INFO/WindowManager(61): WIN DEATH: Window{405917c8 Toast paused=false}   
02-03 15:52:50.252: WARN/NotificationService(61): Object died trying to hide notification android.app.ITransientNotification$Stub$Proxy@ 406031c8 in package com.taobao.iphone4s   
02-03 15:52:50.252: WARN/ActivityManager(61): setProcessForeground called on unknown pid: 736  
02-03 15:52:51.622: DEBUG/dalvikvm(340): GC_EXPLICIT freed 7K, 55% free 2530K/5511K, external 1625K/2137K, paused 45ms   
02-03 15:52:56.762: DEBUG/dalvikvm(252): GC_EXPLICIT freed 7K, 54% free 2536K/5511K, external 1625K/2137K, paused 55ms  






主なエラー

02-03 15:52:46.405: ERROR/CrashHandler(736): Unable to start receiver com.taobao.iphone4s.BootBroadcastReceiver: android.content. ActivityNotFoundException: Unable to find explicit activity class {com.taobao.iphone4s/com.taobao.iphone4s.Start}; have you declared this activity in your AndroidManifest.xml? 





理由 AndroidManifest.xml に該当の Activity 設定が追加されていません。

回避策 AndroidManifest.xmlに、対応するActivityの設定内容を追加してください。

		<activity android:name=".Start" android:label="@string/app_name"
			android:theme="@android:style/Theme.Dialog"
			android:screenOrientation="user" android:configChanges="orientation|keyboardHidden">
			<intent-filter>
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
		</activity>