Home > Blockchain >  how to declared an activity in AndroidManifest.xml?
how to declared an activity in AndroidManifest.xml?

Time:02-06

Class referenced in the manifest, se.linerotech.myapplication.RepositoryActivity, was not found in the project or the libraries

enter image description here

this is my first app ever (github browser),am copying the steps from a video and when i tried to debugg my app to see if i was getting the data for user it crashed

enter image description here

i tried to redo the steps and go over everything i did but it didnt work

CodePudding user response:

Class referenced in the manifest, se.linerotech.myapplication.RepositoryActivity, was not found in the project or the libraries

That is because you do not have a class with that fully-qualified class name. Your class is se.linerotech.myapplication.activity.RepositoryActivity, because it resides in the se.linerotech.myapplication.activity package. Use se.linerotech.myapplication.activity.RepositoryActivity instead of .RepositoryActivity in your manifest.

CodePudding user response:

Just to be clear, you have two different errors in those screenshots.

The one in the manifest is saying it can't find the Activity class with that name, for the reason outlined in CommonsWare's answer - it's looking for se.linerotech.myapplication.RepositoryActivity, and that's not where your class is. It's in red because it's an unrecognised name/not found.

The other error is in the output window - it's saying you have an Activity class at se.linerotech.myapplication.acitvity.RepositoryActivity which hasn't been added to the manifest. This is true (you tried adding it, but didn't do it right) and every Activity needs to be included in the manifest, which is why it's complaining.

The two errors stem from the same issue, I just wanted to make it clear what each one means, since if you just looked at the error log you might think you've used the correct fully-qualified name for the class (it's right there in the output!). But it's two different sides complaining about the same thing for different reasons.

  • Related