i am stuck
i have these two errors and i need help cause i am heavily stuck
same error for both errors
84 Replies
Is this Windows forms?
no
it is not
it is an android program
idk if that will make it harder for help
Okey im really sorry, I thought it was forms because Iām studying at a university and having a little problem with it thought maybe you could help me
But if your not using it then I apologize
naw its fine
im just starting to learn like c# and shit
If you are having problems then make your own help thread, don't try to hijack someone else's.
"Android program"... meaning Xamarin? Maui? UNO? Avalonia?
Im not hijacking I was asking a question, you know when u are new in thing like I am in this group and on discord you need to make mistakes to learn
idk
how would i check
Uh, well, when you were creating the project you probably picked one of the options, so
Looks like Xamarin to me, but I'm not entirely sure.
Safe to assume not Uno or Avalonia
So either Xamarin or Maui
I guess check the namespaces and installed packages in the csproj?
If there's no mentions of Maui, then it'd be Xamarin ig
its cs but idk what yall talking about im new to this
Yes, I can see it's C#
What we're trying to figure out is what Android UI framework are you using
There is a few
Xamarin, MAUI, and the others listed are mobile frameworks for c#.
@DarkAngel Are you following a tutorial or something? Coursework? Kinda curious how you got to this point with no idea of what framework you're using.
Also, try looking through your project references or nuget files to see if any of those libraries above show up.
Assuming this is Xamarin, you might want to take a look at this: https://github.com/xamarin/xamarin-android/issues/2850#issuecomment-475003004
GitHub
'Resource' does not exist in the current context throughout the pro...
I am getting above error across the project where ever I am using word Resource to get the Ids of controls. 1>------ Rebuild All started: Project: SISAPP.PCL, Configuration: Debug Any CPU ------...
Sounds similar to the problem you're having
ill look at that
and also no im not following a tutorial i had an idea for a cool app that would just overlay the lyrics to the spotify long your listening to and i was working at it to trey and figurout how to get the spotify api and al this shit working but i couldnt so i had to resort to getting the code generated by this cool website that is really helpful and i got this but i was having trouble with these errors
You're gonna have a rough time if you're relying on content generated from a website without knowing how anything actually works. I'd really recommend spending some time learning the framework you're working with.
well i fixed the error buti have a new error it is with layout and id
And that error is...?
Don't keep us in suspense
one sec
Looks like Xamarin to me
yeah but can soemone help like i am so confused
If you comment out your erroring code, does your project build?
like the whole line or just the part that is highlited by the red?
It'd have to be the lines that have any red errors š
just makes another error
same for that next line
and the linme at the top of the squiggly brackets
?
Green lines are fine
The red ones are errors thought and prevent building the project
okay
Resources
is a static class is that is auto-generated when your code builds successfully. If you can't find it, I'm suggesting temporarily commenting our lines with errors so that when you build, the Resources class is created.
Then we can try uncommenting the lines and see if you can find Resources theni know how to fix the first error butidk about the second one
Which error?
image wouldnt paste
nvm idk where the icon folder/file is
i may have to create it but idk
So typically the icon is located in a few folders called
Resources/mipmap-...dpi
it is Xamarin
Yeah, I figured it was
\there are alot of those
Yup
Do you have your icon file in those?
idk
all of them execpt for the first one
have png files
What's the icon's file name?
idk
Hmm, that looks correct
Can you try doing a clean and rebuilding the project
okay
Can you show me your AndroidManifest.xml if that doesn't work
what do you mean by clean?
Top left, Click "Build" then select Clean Solution, then Rebuild Solution
oklay
ill tell you what happened
happens*
same thing
xml file
that looks pretty default, so I assume you haven't changed anything in there
no i havnmt
i have only like just started this solution
Did you change the app's icon any either or is that default too?
default aswell
Alright
If that clean and rebuild doesn't work, I think it would be a good idea to try doing a deeper clean by deleting the
bin/
and obj/
folders. They are typically generated when you build the app. Sometimes that can contain outdated stuff that can cause a build to fail.adn where are those files/folders at?
nvkm
Same folder your csproj file is at
Same problems
What are all the errors currently?
The same tei
Two
As before
Only two?
No syntax errors anywhere else?
Nope
Just those two
can you show me your csproj file?
You'll have to Right-Click and click "Edit Project File" to see the actual text
Can you show the AndroidManifest.xml, but as text?
How?
Usually you can right-click and do Open With, and pick XML editor
Or just open it in notepad or something
Nvm
Also WIN+Shift+S takes a screenshot in Windows
Yeah
I can't read that š
But ny pc internet turns off at a certain time cause im got school tommorrow so i cant use disocrd on my pc
There
Hm, that looks correct too
So what that defines is the mipmap folder and appicon(.png) for the android app we were looking for earlier
Yeah
Honestly man, I've run into this before and I can't recall what I did to fix it
I'd recommend creating a new project, make sure it builds, then copy over the code you were working on and make sure it still builds
Also, if you want a "save point" for your code, so you like a version you know used to work, look into how to use GIT, which is essentially save points for code. Even lets you compare what changes you made since the last "save point" (commit) then
Yeah im probably going to give up on this but i jave a nother project i wanna work on that i may nees help on but i may not cause it dose t need like all thos typa shit oike apis and all that so i think ill be fine but idk
Keep it up! Sometimes mobile app projects can be weird. Albeit that is a rather ambitious project š You'll definitely learn a lot by trying to implement it, no matter how far you get
@ZZZZZZZZZZZZZZZZZZZZZZZZZ, idk if you had any suggestions. I don't remember how to fix that icon build issue