Reputation: 31
I am trying to display the current date, but after running this code, it force closes the application. I tried this example to display the day, month and year in a TextView
:
Upvotes: 0
Views: 124
Reputation: 9507
Everything your code is ok accept you miss to declare your activity name in your meanifeast.xml file. Please check it.
<activity
android:name="com.example.test.ListActivity1"
android:label="@string/app_name">
</activity>
Upvotes: 0
Reputation: 21191
Add this to your manifest file
<activity android:name="com.example.test.ListActivity1"
android:label="ListActivity">
</activity>
Upvotes: 0
Reputation: 15847
You need to add your activity name in your manifeast file
<activity
android:name="com.example.test.ListActivity1" <-----
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Upvotes: 1
Reputation: 1363
I think you haven't mentioned the name of the activity properly in the Android Manifest file , Check your manifest file for the Class name .
Upvotes: 0
Reputation: 1502106
Yes, the error is that it's looking for com.example.test.MainActivity
, whereas your activity is com.example.test.ListingActivity1
. Either fix your deployment, or change the class name.
(Note that this has nothing to do with what the activity does - it hasn't got that far.)
Upvotes: 2