I have been coping with an annoying "bug" in eclipse (android) for some time, and today it has just annoyed me to much! So I was wondering has anyone else come accross it, and have you found a fix for it?
It's hard to explain, so hopefully these three screen caps will help:
The first screenshot, everything is ok.
The second screenshot, after a simple click everything moves around.
The third screenshot, another click and things move again.
Closing the file and opening it again seams to solve the problem for a while, but it's really annoying!
Has anyone come across this, or a fix for it?
--EDIT
Forgot to mention, I am running:
Eclipse 4.2.0 64-Bit (on Windows 7)
ADT 20
This is a known bug and happens if you edit the layout in the visual editor and then switch back to the xml editor. You can sometimes fix it by scrolling up and down the file or selecting all the text. Otherwise, just close and reopen the xml file when switching from visual editor to xml editor. It's annoying and still happens to me even after several updates to ADT.
Edit:
I have since found a better solution. In Eclipse go to Window->Preferences. Then under Android->Editors uncheck "Automatically format the XML edited by the visual layout editor". This should solve the problem. You can always auto-format the code manually by pressing Ctrl+Shift+F.
As some commentators have mentioned it seems that this is a duplicate (have flagged as such), although as it is a hard issue to describe that is no surprise! I have tried an answer from one of the questions and it seems to solve the problem. Although it does not prevent the issue!
Related
I don't know how to explain this other than I cannot click on anything in the android studio designer. I can edit the xml fine, but I am trying to use constraint layouts and its easier if I can drag and drop things. When I hover over anything the hand pointer does not appear and the attributes don't show up if I click. I think it has something to do with floobits but I'm not sure. Floobits just seems sort of buggy to me. Just wanted to post to see if others have had the same problem or for someone to hopefully point out something obvious I have missed. I have opened another project and that works perfectly fine. Thanks.
Screenshot:
Clean Project -> then Rebuild project -> then restart Android studio
Personally I have no problem with Android Studio, but one of the people on my course is having a strange problem with the design view. Lines and boxes keep appearing and are causing problems and after researching profusely for the last couple of hours I've been able to find no mention of what they are or how to get rid of them anywhere on the internet.
I found one other stack overflow post about these that had been submitted a couple of months ago, however it unfortunately featured no replies. I've added the screenshot from this post just to save me getting one but it's the same problem.
Does anybody know how to get rid of these? Or what they are? Because they don't show on my Android Studio.
The screenshot
Thanks in advance.
maybe it just some bugs appeared on install?
Try to just:
1. File - > clear cache and exit
2. Reinstall studio
3. Install studio 3.0 in early access
Hope it will help)
Every time I open an activity layout in order to view its design, I can't see anything, and there's a "Loading configuration" message. How to solve it?
Looks like this is related to the following issue: https://code.google.com/p/android/issues/detail?id=56691&q=%22Loading%20Configuration%22&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
I had the same issue and it got solved by using the menu item: File->Invalidate Caches/Restart
Try to delete the build folder.
Here are the details:
Yesterday(2015/6/10) I faced to the same problem, and I solved it by using beyond compare:
This problem occured after a forced upgrade.
I have 2 projects, one worked(newly created) and one doesn't.
So I used beyond compare to compare the 2 projects' folders.
Luckily I found build folder of the not-worked never changed even though I clear cache, restart and rebuild it several times.
build folder deleted and everything worked fine now.
I've had this issue before, and it was usually not long after an error had come up.
Check the Event Log for errors. Usually a restart of the IDE fixed it for me though I appreciate that's not ideal. The errors weren't anything specific I think just teething issues with Android Studio - tis just preview software after all.
Android screen design in eclipse Layout files doesn't appear like the way it appears on devices or emulator. When I designed the layout first time it was working will but suddenly all layouts has damaged on eclipse but not on real phones and emulator
The damaged design:
How it shown on phone:
so does anybody experienced this situation?
Appreciate your help.
Hey are you using Absolute or Relative Layout, then try to use LinearLayout.
It happened many times for me. In that time, i just restart my eclipse otherwise, remove the project from workspace then, restore it from local history. This will give the solution. Try these ways.
Hope this helps you.
SpK almost answered the question.
Anyone faces this problem can exit eclipse and from task manager try to find adb task under processes tab then end this task. Then open eclipse again; It worked with me.
I don't get this. I've searched everywhere and no one's answers have solved this for me.
Why does this keep happening? I can't do anything! The XML Code is still there, but it doesn't show anything in the Graphical Editor. The Palette comes up if I change it to "4in WVGA (Nexus S)" or some other configuration, but I still can't see anything and the Theme drop down menu is unselectable. All my XML documents are like that.
Just delete any custom device screen configuration you have added . It will solve the issue :)
That just happen to me and after some attempts I found the reason.
When I first opened the project in eclipse I found some errors related with the version of Java. I changed the JDK compliance to 1.6 (Project->Properties->Java Compiler) and all errors dissapear but all graphical layouts went blank.
I uncheked "Enable project specific settings" (Project->Properties->Java Compiler) and now all the graphical layouts are working.
When everything fails, close eclipse and start it all over again, it solved my problem.
I also had that problem, it happened to me when i imported my project. after some time I came to reason just change the workspace of eclipse to folder, which contains your folder.
I changed workspace on opening eclipse, there can be some other way as well
hope this will solve it
If it has never worked for you (or something went wrong upgrading your SDK, as in my case), you may need to install an extra package. For me the issue was fixed when I installed Android Native Development Tools under NDK Plugins (SDK version 20).
I had this problem since I switched the option Show previews in the palette. I switched to show only icons, everything is ok now.