Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
03/09/13 02:28 PM (12 years ago)

Errors appear as I just open any xml file in Eclipse

Everything was working fine, but as I opened some of the layout files in the project, a warning appeared (noticed that later), and when I clicked anywhere in the Graphical tab, inmediately errors appeared saying something like... Unexpected namespace prefix "xmlns" found for tag LinearLayout screen_menubuttons.xml ‪/Chavez1/res/layout‬ line 34 Android Lint Problem Anybody knows what´s wrong? Thanks in advance! Yosi
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 02:51 PM (12 years ago)
What's wrong? 'Android'. I get those errors too. Not entirely sure why, but it's highly annoying. The only thing I can do to get rid of it is to clean and rebuild. Sometimes more than once. Heck, sometimes more than twice. But that's what I have to do. Cheers! -- Smug
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 03:03 PM (12 years ago)
Thanks Smug! So I just rebuilt the project again... and indeed when I just open a layout file it starts giving errors... But I thought that´s the whole idea here, if I cannot touch the code, what´s the point in the Android Learning Path? There must be a way out.... So I am curious Smug, how do you keep working? Do you design/edit the app only with the BT control panel? For anyone else who sees this post, the message that appears is: Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties. Of course, tried the Fix Tool, but didnt work... Android Experts, where are you? We need some Helpoid!!!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 03:08 PM (12 years ago)
It happens. It's something I'm (begrudgingly) learning to deal with. I look at the other layouts. They fall apart. I clean and rebuild. I look at another layout. They fall apart. I clean and rebuild. I look at my own layout. Sometimes it falls apart. Sometimes not. I alter it. If it falls apart, I clean and rebuild. It's a frustrating, laborious process. But eventually it works. If it were just me, I'd think I was doing something wrong. But it's not just me, and it's not just you. There are a few of us who experience this. We find a workaround and we keep pushing through. It's a hard road. I love Apple hardware, hate the company. Hate android, love the company 'policy'. But programming on the iPhone gives me that 'steel bridge' feeling, whereas Android gives me that 'house of cards' feeling, lol! Cheers! -- Smug
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 03:12 PM (12 years ago)
Hi, I have found this, but still haven´t understool how to do it. Maybe you do. http://stackoverflow.com/questions/7637144/android-requires-compiler-compliance-level-5-0-or-6-0-found-1-7-instead-plea Thanks! Yosi
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 03:19 PM (12 years ago)
Hmm... the thing (for me anyway) is that 'if it's not broke, I don't fix it'. And although I know there are 'errors', there aren't actually any 'problems'. And while I'm always happy to fix a problem when it exists, if it's just 'behavior' I tend to leave it alone; I've had too many unusual results from someone elses 'fix'. So, I've seen that 'fix' before, but I don't implement things in Android that way without serious backup; Eclipse doesn't have a very good 'undo' feature, lol! Cheers! -- Smug
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 03:32 PM (12 years ago)
OK, let´s see if I understand (and sorry if I am getting you back to past Android nightmares...) :) I am trying to do a very simple, stupid quiz app, basically to get started and learn. After downloading the source and running the app in the emulator, I saw some things that I need to change. Mainly design, or layout issues. It seems that there is no way to change certain things in the BT plugin, so I thought to do it on Eclipse... and then I started to see Red Stars.... But you say you can edit the file, then clean and rebuilt it with the changes you did? How? You see, that´s what happens a few hours after I changed my "BT status" to Android fan... :) Thanks!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 04:12 PM (12 years ago)
If I knew a 'hard rule' to provide, I would. But I'm afraid I haven't found the 'magic sequence' yet. I try a lot of things. One item that has provided some degree of success is changing the setting for 'cleaning'. When you select 'project' > 'clean...' before you press any buttons, take a look at what options are available... I've unchecked 'Start a build immediately', because for whatever reason, sometimes it doesn't work to clean and rebuild. So I just clean it. It builds for me when I launch the app into my device. Another 'by the way' is that, while you have layout 'code' in the foreground, you can't launch your app. You have to change tabs to one with 'real code' in it, or just close the XML file. But while it is open and up front you (well, at least 'I') can't launch my app. Just a mention. Good Luck, and don't give up! Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 04:32 PM (12 years ago)
I thought this was informative, although it doesn't have to do with the error/warning thing: http://www.androidaspect.com/2012/02/linear-layout-tutorial-android-ui.html Cheers! -- Smug
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 05:19 PM (12 years ago)
Thanks! Will check that also :) Meanwhile, and after reinstalling Java bla bla bla, still error messages... Question: when you said you clean, you mean basically, disregarding the errors and keep being a happy person (as I was a few hours ago)? Is the app healthy after all that? Tnx! Yosi
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 05:45 PM (12 years ago)
Well, if there really 'are' errors, it won't compile and run. And it's crazy for us as 'android novices' to beat our heads against the wall on a problem that may not actually 'be' a problem.. it may just be errant behavior of the eclipse/android/java environment. So even though it may 'show' an error, it's not really an error 'unless' the app will not compile, in which case, it probably 'is' an error, and you'll have to fix it. But I'm tired of chasing ghost issues, especially when it affects files I haven't even touched. So unless the app just won't compile, or provide the results I desire, I don't worry about problems 'outside my code'. But I've had to arrange my environment to assist me on this; i.e. setting the 'clean options' to my benefit. Cheers! -- Smug Oh, and when I said 'clean' I'm talking about the process of allowing the eclipse environment to 'clean' the project. When you 'build' a project, you are in essence compiling the project for either a test run in your device, or a compile for publishing. When you 'clean' your project, you are basically removing all cached files, and other bits and pieces that are created for the 'build'. Sort of a 'reset'. You initiate a cleaning via the eclipse "Project" menu. There is a bunch of 'builds' and there should be a choice to 'clean'. Choose that. Unselect 'rebuild' in the dialog box. -- SW
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 05:47 PM (12 years ago)
Thanks for your patience Smug! Just to have my mind clear: did you manage to compile the app after that?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 05:51 PM (12 years ago)
Sorry; I edited my other post as well... Sometimes yes; it compiles. Sometimes I actually have a problem, lol! But if it isn't 'my' problem, it usually compiles as it should. Cheers! -- Smug
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 05:55 PM (12 years ago)
:) Thank you! Cheers! Good luck!!! Yosi
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 05:57 PM (12 years ago)
Is this your first app? I guess I should ask if your environment is complete. I don't want to tell you 'its really nothing' and find out later I should have told you to load a different package or some setup/configuration related issue, rather than an operational issue :) If this is your first app and haven't had a successful compile, although what I've said 'applies', it may not be the only thing that applies. Cheers! -- Smug
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/09/13 06:06 PM (12 years ago)
It is my first app, but I am pretty sure the environment is well setup... but who knows... I just downgraded the Java version I had here to 1.6.0.43 cos I read it might help for the compliance problem. It actually did but the errors in the xml files remain. But as far as I have read, it seems indeed nothing is wrong, and as you said, if it is not my problem, just ignore the warning and keep it going. It runs in the emulator, so... I guess its time now to figure out hundreds of other issues that I want to understand / solve / learn... Thanks again for your help and support! Even though you will probably forget we had this conversation... :D Have a great day / night / week / month / year / life!! Yosi
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/09/13 06:25 PM (12 years ago)
Oh, well if it runs in the emulator, then you're good. Heck, half of peoples problems is getting the darn emulator to run, lol! I use my device for almost all testing. Mostly for speed; that emulator takes a long time to start. Good luck with all your Android Challenges and stop by if you hit a bump! Cheers! -- Smug
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/10/13 08:10 AM (12 years ago)
Hi @Salamandra, On this, "Unexpected namespace prefix "xmlns" found for tag LinearLayout screen_menubuttons.xml ‪/Chavez1/res/layout‬ line 34 Android Lint Problem" All layout files, xml, should be lowercase, titles, and any images. Like Chavez1 should be chavez1. Hope this helps some. LA
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/10/13 07:59 PM (12 years ago)
Hi @LA, Thank you! Unfortunately it still gives the same errors :( You don´t get those errors when editing layout files? What Eclipse version do you use?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/11/13 01:56 AM (12 years ago)
when you edit the xml.. are you editing the code or through the editor?
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/11/13 03:33 AM (12 years ago)
I double click on the .xml file, the graphic editor opens and when I click anywhere, error appears... I am still too young to edit xml without the luxury of seeing it :)) Thanks!!!
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/11/13 03:49 AM (12 years ago)
yeah when i first started i did the same and had a ton of errors... try copying the original back in the code section and start again.. then it will remove the errors. use the graphic editor as a reference of what you should change in the code editor. just writing out loud. i think it could remove the errors. note: im not an android expert lol but try that
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/11/13 04:37 AM (12 years ago)
Cool, thanks! Will try that when I get home to my pc... Meanwhile I am an Android fan with an iPhone.... Like anEnglishman in NY.... Btw, are u from Palma? Eres mallorquin?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/11/13 04:48 AM (12 years ago)
haha! i hear you. from USA - living on this wonderful island! you've been here? you speak spanish or Spanish living in Tel Aviv? :)
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/11/13 05:35 AM (12 years ago)
Spanish Catalonian living in Israel :) Been only in Ibiza, I am sure Palma is a great island too. Have fun there for us all!! One more question, what Eclipse version have u got?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/11/13 05:42 AM (12 years ago)
Muy bien! Yes, I'm using a Mac with Eclipse 3.72
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/11/13 06:51 AM (12 years ago)
Hi @Salamandra, I am using the new bundle that can be found here with other tutorials from @GoNorthWest: https://dl.dropbox.com/u/4993711/CurrentBTDocVersions.txt What exactly are you trying to do? LA
 
Salamandra
Android Fan
Profile
Posts: 52
Reg: Feb 11, 2013
Tel Aviv
8,170
like
03/18/13 06:00 PM (12 years ago)
Hi, Thanks, great link! Didn´t know those YT videos from @GoNorthWest I am trying to change the outlook of the quiz screen, then would like to change some parameters in its java file. I´ve been on the road for a few days. Will work on it again now. Thanks again!
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
03/19/13 05:39 AM (12 years ago)
No problem @Salamandra! @GoNorthWest has great tutorials! LA
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.