I need help...I don't have much hair left to pull out.
I use Eclipse and I use the "Project Explorer"...
I am no longer able to launch my app. It now tells me it is having errors but not marking anything with a red X other than title. It calculates up to Launching App name 100% then says there are errors. any time I change anything and save it the x on the disappears, so I attempt to run it and comes back with the red X and error that there are errors, but I have no clue. I even deleted everything I added to put it back to the last launchable version and even that isn't working.
I have no clue how to read the log cat or the error log.
I tried cleaning the project but the same thing as above happens.
This makes no sense...there is even an R.java file. I have no clue where to even look for an error or how to find it...
Please help...I'm sure this something simple that I am overlooking.
Do you have the Problems view open and visible? It will list all build/compile errors.
Related
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
Here's an odd issue I can't seem to find any information on.
I'm working on an Android app with a friend who uses Eclipse -- I use Ant and the Android command-line tools. Sometimes when I checkout code that was written by him and the project.properties file gets pulled into my local workspace, I'll have to change the path to the libraries back to where they're at on my machine, as it gets automatically set for him via Eclipse. This may be of use to know in light of what just started happening when I try to launch 'monitor' as I've always done; I get this error dialog box that pops up and says: An error has occurred, please see the logfile: /home/user/.android/monitor-workspace/.metadata/.log
So I did. It was, after I'd tried to launch monitor several times to no avail, a really long logcat-like file of Java traces. I cleared them out, thinking that perhaps it had run over its own max size for internal monitor data, but that didn't stop it crashing. A new set of errors just gets appended.
This is the first time this has ever happened, and unlike essentially every other Android problem I've had, I can't seem to find any existing information on it. The device monitor now seems to want to be integrated into Eclipse. I don't use Eclipse so I'm not sure how the monitor runs within it, or whether I'm correct in assuming that some configuration file somewhere needs to have a line changed (or whatever).
Here's the content of the logfile:
http://pastebin.com/JitCWrGg
Could anyone lend a word of advice?
Many thanks!
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
The last time I ran my app, it moved from the first/primary Activity to the next one, as it should
have, when I selected a button to perform that Intent.
Now, however, the debugger opens up and I get a slew of messages in the Debug tab. The first one,
representative of the rest, says, "ActivityThread.performResumeActivity(IBinder, boolean) line: 2120"
???
It says, "Source not found" with an "Edit Source Lookup Path" button below it in Debug view which opens when I try to move to the next Activity from the main one. As stated, it worked just fine the last time I worked on this app (a few days ago), and the location of the source hasn't moved, so how could that be the case...???
When I then switch back from Debug perspective to Java perspective in Eclipse, I get:
"The app has stopped unexpectedly. Force close?"
Have you tried cleaning the project? mine was force closing out of nowhere before, and once I cleaned it, it stopped. Try that.
First of all try cleaning the project. Secondly I have came across the same errors,Android has a great framework to work in. However, it is in its infancy and debugging my code has been a very big problem for me. Whenever something goes wrong in the code, I always get "source not found" error. It doesn't tell me I have a nullPointer exception , or string is incomplete. No matter what's wrong with the code, I always get "source not found" error. The reason that happens is Android doesn't pack the source along with the application it sends to the emulator (maybe they should do that for a debugging run). After searching the net for a while, I came across this solution - wrap your code in a try and catch block and then log the exception to console. By doing so you will exactly know from where the error is getting generated.
"Source Not Found" just means the line of code that generated the exception is in a binary file. It does exist, Eclipse just can't show it to you.
It turns out that my declaring a SharedPreferences object:
SharedPreferences KITPrefs;
...but then failing to instantiate it was the culprit. Now that I've added:
KITPrefs = getPreferences(Activity.MODE_PRIVATE);
...it works fine now.
I am a little bit new to developing for Android using Eclipse (Coming from a .NET/Visual Studio background).
My biggest problem in developing Android app is "debugging" them. Every time the emulator throws an error, there is no message, no explanation of what caused the error. I basically have to keep doing trial/error until something works.
My question is: Is there a better way to analyze the error messages that emulator shows (basically some stack trace about Dalvik)!
Also, is it possible in Eclipse [when debugging] to move the debugging cursor backwards to re-evaluate a variable or "skip" some lines of code?
Use LogCat view to see error/debugging messages. Regular console is of very limited help. Window->Show View->Other->Android->LogCat There on the top you will see some round buttons that basically can filter log from V (verbose) to E (error). You can't copy/paste from theLogCat window but you can save selected output to text file
Regarding the error messages (I'm assuming these are the messages that show up in LogCat): I've found that analysing the error messages and working your way up the list until you reach code that is yours is the most effective way to work. Frequently (for me at least) the emulator will crash and break somewhere in the OS code (which you probably don't have the source for) but you can follow the LogCat messages back to your code and start to see where the problem is. The crash may appear to happen in the OS code, but the original cause is typically you passing something wrong to the OS.
Regarding going backwards in code: nope, at least not with the my Eclipse Ganymede install
Regarding skipping code: When your in debug mode under the Run menu you can select "Step Over" (skips going into a method) , "Step Return" to exit a method and "Run to Line" in addition to setting Breakpoints by right clicking. This causes the code to run, but you aren't single stepping through it. Otherwise the only way to "skip" lines of code is to comment it out. I believe you can also change the value of variables in the debugger, but I've never tried personally. This may give you the desired effect.
Try closing all unrelated project, switch off eclipse and then do a clean and build for the project in picture.