Endless "Loading Configuration" in Design view - android

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.

Related

Android Studio Inspections doesn't work correctly

When I run inspect on my code it shows a warning like this:
Property "isLoading" is never used
Even though I am using that property. There are no problems with code, everything works fine, but this issue annoys me, what should I do?
You can see both warning and usage of that property in the photo below:
If the answer above doesn't work,
Go to your local drive -- Users -- Android Studio -- System
and delete the caches folder, then open android studio.
Go to file -> Invalidate Cache/Restart
Click on Invalidate Cache/Restart, a menu pops up
On the menu, click on Invalidate Cache and Restart
// Wait for android studio to restart.
I made an enormous mistake. I assumed Android Studio knew what it was doing when it said it found unused resources and I let it remove them all. It removed much needed XML id tags, it removed drawables, launcher icons.... what a mess. Has no one in Android studio land addressed this egregious set of errors? I spent a far too much time undoing all the things "Inspect code" said was wrong and I let fix only to find the app fails.
Lesson learned - never assume Android Studio knows what it is doing when it comes to inspections. Always check each before taking their often erroneous suggestion

Android Studio mixed codes of two different Applications

I was editing 2 apps at the same time. One is a new idea, where I am doing some tests and the other one that is a stable app, that eventually needs small edits.
I do not how it happened but Android Studio mixed then. In fact, AS is saying that for some activities of the second, the code is the same as the first. On the example below, even the second being java coded, it shows it as xml.
If I look at the same file outside AS, using Wordpad, for example, the code is correct, i.e. it is the original like I did (see the picture).
I tried many things like cleaning cache, closing and opening AS, so many times, so many ways, etc. but nothing works. For days I am stuck on this issue. I tried even the function ´Compare with´ but it shows the (wrong) xml code.
Was not only this Activity that appears ´corrupted´ but others of the stable one.
Any idea?
On Left is the beginning of the real code; on Right how AS shows it
Try deleting the caches folder in .AndrroidStudio and restart Android studio.
Path :
C:\Users\username\.AndroidStudio3.6\system\caches
Sometimes it does so. I met the same issue and fix it by:
On your android studio top bar, go: File -> Invalidate Caches/Restart -> Invalidate and Restart.
I'm using android studio mac.

Cleaning my project in Eclipse caused errors

So I've been working on projects for my class and I had a small error in an extra instance I was calling. I hit clean to see if it would clear it out and instead it created errors on all of my buttons and all of my toasts. It now says they all cannot be resolved or are not fields. They were all working fine until I had hit clean as I had tested everything right before doing so. Has anyone else had this occur?
I know it sounds weird, but this occurs when there is an error in one of the .XML layouts, no matter Eclipse is not detecting it. Please check any recent changes in XMLs and clean again.

Eclipse hangs when trying to add menu.xml

I've recently starting developing with the android sdk. Currently, I am trying to add code to use a menu, however, when I try to add a menu.xml under res/menu, Eclipse hangs and freezes every time. When I reopen the Eclipse, menu.xml is there, but every time I try to open it, Eclipse hangs and freezes again.
I am running on OS X Snow Leopard, Eclipse 3.6.2 and the latest android sdk and adt plugin.
Any help, insight, thoughts?? I am thoroughly stuck.
Thanks.
Dustin
Thanks for the input guys. What ended up working for me was instead of trying to manually create a new menu.xml file, I find the add android .xml wizard and using it instead allowed me to add whatever I needed with out any hang ups.
Same problem happens for me even under the latest version of Eclipse (Helios). If I wait long enough, Eclipse reports a stack overflow exception and then this shows up in the Output window:
W/ResourceType( 5124): Bad XML block: header size 0 or total size 9949440 is larger than data size 0
menu.xml:1: error: Error parsing XML: no element found
This indicates that the XML parser isn't handling empty documents and the Android menu editor is barfing on the newly created file while trying to open it. I'm sure there is some "standard" way of creating a new menu that doesn't break the IDE but I have no idea what that method is. I'm too used to editing my files by hand but this crash/hang bug is a serious nuisance.
Dustin,
I think what has happened is, your settings have become corrupt. I highly recommend resetting all your settings. Keep in mind, you will have to re-import all your projects so this can be quite a pain, but I really think this will fix your problem.
To start, find your workspace folder and rename it to something like "workspace-bad"
Then, create an empty workspace folder to replace the one you just renamed.
Lastly, open eclipse and it will act just like a brand-new installation.
You will need to re-import your projects, which can be done by going to eclipse, hitting File>Import...
Then select under General
"Existing Projects into Workspace"
then hit "Next" and then hit "Browse" to find the root directory
also make sure "Copy project into workspace" is checked
I also recommend doing your "problem project" first, that way you don't waste your time doing the rest and then find out you have to re-create it.
I'm hoping that fixes it for you, good luck! :-)
-Jared
I ran into the same issue with the same setup. Right clicking menu.xml, selecting 'Open With', and selecting Xml Editor seemed to be a viable workaround for me.

MotoDev Says I Have Errors, but it won't show me them

This is a really stupid question I imagine, but is there a way to search for hidden errors. I'm working on a project in MotoDev's Eclipse environment, and it won't let me run suddenly stating that I need to fix errors first, but it won't show any errors in the log at all.
Check out the Problem view, you may get something there.
There shouldn't be any hidden errors in MOTODEV Studio. As Tony mentions, bring up the Problem view to see if there are any errors listed there. Also, look in the project explorer and see if there are any files or folders with a red X on them, which indicates a file with a problem is in there. Failing that, do a clean build on the project.
If the problems persist, give us a shout on the MOTODEV forums and we'll work with you to get the issue resolved.
Eric

Categories

Resources