“Activity not found” in Android

后端 未结 7 1418
后悔当初
后悔当初 2021-01-24 23:04

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 PresenceL

7条回答
  •  执念已碎
    2021-01-24 23:40

    You are trying to use a fragment as an activity. You can either rename PresenceLogFragment to PresenceLogActivity and have it extend Activity instead of Fragment or you can try and use your fragment as a fragment.

    Also, any activity you try to use in your app needs to be declared in the manifest (link)

    More about fragments and how to use them here

提交回复
热议问题