Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Self-Destructing Message Android App Starting the App Navigation with Back and Up

Carney Bernard
Carney Bernard
3,615 Points

Error in Android Studio - "Default Activity Not Found"

Hi everyone!

I have been following along closely to Ben's videos and I am getting a run error on Android Studio. First the app wouldn't run, then I checked 'Select Run/Debug Configuration' button and there was a big red X on the Android icon. When I clicked on the edit configurations window there is and error that says 'Error- Default Activity Not Found.' Also whenever I try to run the app the edit configurations tab comes up instead of the AVD Manager. This particular instance is very odd because this has never happened before ans AS was working fine yesterday.

Thanks!

3 Answers

Make sure you have specified the default activity in your AndroidManisfest.xml file. Within your default activity's xml<activity> section, there should be these tags:

            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
Carney Bernard
Carney Bernard
3,615 Points

Yes I already have hat in my Manifest.xml file. Still haven't figured out whats wrong...

Ricky Sparks
Ricky Sparks
22,249 Points

Had this problem today as well?

Carson Jones
Carson Jones
12,473 Points

I had this problem too and when I looked at Android Manifest. The problem was not with the intent filter, but with activities that were deleted and still in the Manifest. All you have to do is delete those activities in the manifest.