我試着在android網站上的教程,但當我嘗試點擊發送消息時,我的應用程序不斷崩潰。我沒有編程經驗或Java知識。我曾經歷的問題,看着張貼,並意識到問題可能與我的第一個應用程序不斷崩潰
logcat的:
"Caused by: android.content.ActivityNotFoundException: Unable to find explicit
activity class {com.kamalak.myfirstapp/com.kamalak.myfirstapp.DisplayMessageActivity};
have you declared this activity in your AndroidManifest.xml?"
但我看看我的代碼不是它有!?可有人請告訴我什麼是錯我的代碼
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kamalak.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.kamalak.myfirstapp.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.kamalak.myfirstapp.DisplayMessageActivity"
android:label="@string/title_activity_display_message"
android:parentActivityName="com.kamalak.myfirstapp.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.kamalak.myfirstapp.MainActivity" />
</activity>
</application>
</manifest>
TKS很多@Andrain – user3475445
樂意幫助ü。 @ user3475445 – Andrain