IntelliJ IDEA editor does not open my XML layout files - android

I tried finding a similar topic, but could not find one.
IntelliJ IDEA crashed (along with my PC) and when I got it back and running, I saw that I can not preview any XML files. I could before the crash, of course.
All I get is what you can see in the screenshot : I can not even chose target API, none of the options do anything, and I tried stretching the view, but nothing happens.
Here's the screenshot :
http://tinypic.com/r/10ct1g3/9
The error I got was :
Exception in plugin Android Support. 5 minutes ago. Occured once since the last clear. Unread.
Error message :
null
I really don't have a clue what to do.

If you have this issue than normally it already helps if you click Build -> Clean Project and then Build -> Rebuild Project.
After that it should work. If during that process an error message pops up then that is the reason why the preview doesn't work.

Related

Android Studio shows symbols in red but it compiles OK

The wise ones suggest dramatic solutions. Is there any harm happening? can I hope that it will recover all by itself. Is this a "cloud no bigger than a man's hand" coming to engulf my project in a terrible storm?
There are 3 cases that i can think about :
1)You have got some kind or warning for example :
Lets say that you are using google maps and want to add "current location button" - if you wont check if the user accepted location permission or not you will be able to run your app but you will have a warning in red line.
2)If some view is marked in red but everything compile with no errors , this is some error and cleaning and rebuilding your project should fix this
3)If some file name is marked as red , there may be some error/warning inside that file itself(for example - XML error inside some layout that allow yo to compile your app)
#user462990 If you can't see any obvious issues. I'd suggest the static analyzer Lint tool. It inspects your code and would give you a detailed report of all issues wrong with your project.
Just go to Analyze->Inspect Code.
In the Specify Inspection Scope dialog that appears select Whole project.
Lint inspects your code without building it and gives you a report of all the issues in the Inspection Result tool window at the bottom.
Clicking on any of those issues takes you to the editor at the exact line of code where the issue occurred.
See below captain Lint reporting for duty 💪.
What's the problem...
It's the color of the "R" now it's red, it was . always black before.
I compressed the project and re-opened it again and the viewPager which was red is now black.

MyEclipse: Changing Android codes takes no effect

I know this is a rare question. Even if there are people using MyEclipse for Android development is doubted :(
The annoying thing is that after I modified my Android project (like an Activity class of a xml file), the project remained the same as it was when I imported it.
I thought there is an important feature that demonstrates this error: When I run my Android project and the console reported that "Activity not started, its current task has been brought to the front". This line occurs because the project didnt changed while as a matter of fact I did change the project and saved it.
Is there anyone has the same problem like me?
-------------add in Oct. 28-------------------
This was what I did: first, I modified one of my activities by commenting out the Toast functions; and then, I ran it however the Toast line still showed on my Genymotion emulator

Random error on application run

alright, weird problem here.
Cant figure out how to solve it...
My app has been running awesome until it randomly said there was an error while running. Like, it will be fine but as soon as i hit run, it will stop and say the project contains errors. But it doesn't. I have even cleaned and closed the project. See pic below...
Any ideas!?!?
Check your error log. It should be in one of the tabs where LogCat is. It should tell you exactly where the problem is.
Alternatively, expend your projects folders until you locate the file that has the red X box on it, that file contains an error if it's

Eclipse not displaying errors with Android

I relatively new to using Eclipse with the Android SDK. Whenever I encounter an error/force close, Eclipse displays a page showing "Source not found"
Is it possible to get it to show the error that is causing this? I assume this is achieved by somehow linking to the android source code. Is this mistaken?
Basically, I am struggling to identify the source of my error, and am hoping eclipse can offer more information than at present.
Appreciate any help with this,
Venatu
Source not found because the Exception is raised from something that you don't have source code, (e.g. Android SDK). You should always refer to the LogCat (Window -> Show View -> Other -> Android -> LogCat) to get the extended information about your exceptions.
Reference: http://developer.android.com/guide/developing/debugging/debugging-projects.html
Yes, most likely eclipse tries to access the android code, which isnt possible since its a library. If you get a force close or any other crash it's always a good idea to take a look inside the logcat, Android prints the stacktrace there. You can usually see exactly which function and codeline causes the issue.
Open the logcat either inside Eclipse via Window->Show View->Other->Log cat
or by starting the ddms application inside the android-sdk/tools directory.

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