Skip to content
Advertisement

“Activity not found” in Android

I am using the navigation-drawer template in eclipse to do a simple Android application. I have some trouble with fragment. I declared a fragment called PresenceLog Fragment in manifest but when I called it in MainActivity, the log still says that

JavaScript

Here is my manifest

Here is my fragment class

JavaScript

Here is my MainActivity

JavaScript

It would be great if you know what is wrong with my code. Also, since I am new to Android programming, I would appreciate it if you could suggest some online courses.

Advertisement

Answer

You have created a Fragment so you could not call it like a Activity. You need to replace a container view, properly an FrameLayout with your Fragment.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement