Android开发问题:ActivityNotFoundException: Unable to find explicit activity class

错误:android.content.ActivityNotFoundException: Unable to find explicit activity class {tt.test/tt.test.ViewActivity}; have you declared this activity in your AndroidManifest.xml? 

 

原因:AndroidManifest.xml未添加对应Activity配置。 

 

解决办法:在AndroidManifest.xml添加对应Activity配置内容。

<activity android:name=".Start" android:label="@string/app_name"  
  1.     android:theme="@android:style/Theme.Dialog"  
  2.     android:screenOrientation="user" android:configChanges="orientation|keyboardHidden">  
  3.     <intent-filter>  
  4.         <category android:name="android.intent.category.LAUNCHER" />  
  5.     </intent-filter>  
  6. </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>


 <activity
            android:name=".TestActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/app_name" >

 

少了红色背景这句

posted @ 2012-09-10 22:34  水——云——间  阅读(2539)  评论(0编辑  收藏  举报