Until recently I could double-click a line in stack-trace the logcat and it would open the source at that point.
Suddenly it has stopped working.
Is it possible that I accidentley changed some option somewhere?
What could I have done wrong?
I found it.
In the project Properties->Java Build Path->Order and Export the src folder of the library had to be selected. For some reason it wasn't.
Works great now.
Well, I don't know about the option, but I can tell you that I've experienced that (and other) particularity with logcat without touching anything in the configs. What I do is make sure that log output is not paused (the little "||" button in logcat console) and if it is I unapuse it in order to let me double click on an entry and have it highlight the corresponding code. Also you may try adding then removing some filters in order to force it come back to life. I know it's lame but from what I've seen it has such issues.
There is a method in this link that creates a log that opens your log position when you click on the row in logcat.
Enjoy!
I had this happen when I cloned a new project from an old project and then ran the new project. Apparently Eclipsed was confused by there being two files with the same path and name in two different open projects in the same workspace. When I closed the old project, it return to switching perspectives and taking me to the line of code when I double clicked the line in logcat.
Related
I added a new fragment to my project in Android studio like the way I did it a couple of times before, but now it says that this file das not exist (and is read only). I cannot edit a thing in it but also do not know how to correctly close it, so I can't use the name, which I really want...
I cannot find the file anywhere within my project and it is also not listed in the project+path (Name/App/src/main/...) but in the entire windows location (E:/...).
And how can I create a permanent file, or better, why does it not work any more?
This must be a fault on your side. Are you sure you are in the right folder? This is the only explanation I could think of. So you creat the files but outside of your project's folder, so you cannnot edit them or anything else, but read them...
Bene
Make sure that you have no LINT ERRORS.
For checking it:
Go to the bottom right side of Android Studio. Tap on "Gradle Console" tab.
If you have some errors(red text) - remove them and try again.
I am new to Android development.
I created an Android project, and imported some images as resources.
Unfortunately, one of them contained a capital letter, which is illegal. I have first renamed, then removed the offending image. Then I delete all images, but Eclipse still insists they are there after clicking refresh refreshing and running clean several times.
Could anyone tell me how to fix this?
If the file actually exists in your workspace . Just Right Click the file and select Validate . It should be alright
This is the problem am facing since many days. am trying to manage that but not able to solve that. while am try to access the project which is existing project into workspace then am getting some kind of error at the "#override" tag and when remove that the error disappear and single error will be shown at the application name and that cannot be removed. Am doing for the mean while is try to copy all the code from the each java file and paste it to another project that was created newly.
Can any one help me in this concern. Thanks in advance.
Your problem is related to JDK for this what you have to do is from menu options choose
Window > Preference then navigate to node displayed in below image and set "Compiler compliance level as 1.6"
This maybe a continuation from 2 of my previous question, or maybe it's a completely unconnected problem.
Previous questions were
Questions on Notepad Tutorial:
Can't read ... AndroidManifest.xml - while attempting Android Notepad Tutorial - Exercise 1
The tutorial asked you to select "Create project from existing source". My 1st original question was where to copy the template (original source) to and from the answers I received, It looks like I should copy the directory-structure/source under the C:/Development/Eclipse/ directory, so it would look like this
_ C:/Development/Eclipse/Notepadv1/... _
I did that, and then tried to continue the tutorial, but when I got to the part that says to select "Create project from existing source", I received a pair of errors
C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-
(Same error prints twice in the Console & WorkSpaceLog
So I posted a second question about the FileNotFoundException:, and received an answer saying to ignore the message, happens all the time... so I deiced to plow forward again. Now I have 2 problem. One of the problems may well be of my own doing, trying to run threw this tutorial dozens of times, and attempting to back out my changes over and over again.
Problem # 1:
I once again start to create the Notepadv1 project using "Create Project from Existing Source" (The cant-read-androidmanifest-xml error still appears), but as suggested I just ignore it. I next select "Android 1.5/Platform 1.5 as the Build Target, BUT the field where you enter the Min SDK Version is grayed out, and you can't enter the number 3 there.. The tutorial says to put the number there, but it seems to become grayed out at the same time I select "Create Project from Existing Source" and get the "cant-read-androidmanifest-xml" error.
Problem # 2:
If I click on [Next] twice, or [Finish] once, I get a pop up box with the message "Invalid project description" - - "Reason: Invalid project description"
[Details>>] "Invalid project description.
C:\Development\Eclipse\Notepadv1 overlaps the location of another project: 'Notepadv1'
".
This did not originally happen. There is no mention of the "Notepadv1" in the Package Explorer or Navigator windows, so I can't find any way to remove it, and I have run Clean Projects, exited eclipse and rebooted the machine a few time... in a few different ways.
Any suggestions? Joe
P.S. I have not yet accept any of the answers to my last question, because the juries still out. I'm not yet sure they were correct. I'll will make sure I go back and accept an answers, once I figure out what the correct answer is - Joe
I had the same issue, and just got it working!
I have no idea how to fix, I'm still getting the error, but It's not hindering me from continuing, so I'm not worried about it.
Is very simple, you shouldn't have copied the Notepadv1 directory into your C:/Development/Eclipse directory, because, when you "Create project from existing source" it copies it there for you. So, the one it's trying to copy from is getting in the way of where it's trying to copy to.
Hopefully that makes sense, and helps.
Problem 1 is because the androidmanifest.xml is missing.
Problem 2 Notepadv1 already exists in your workspace.
If I were you I would change your workspace to your Documents/My Documents or equivilant folder depending on your OS. You can do that under File->Switch Workspace->Other. Then delete what you have under the Eclipse directory. It could get messy if you update Eclipse or have multiple versions of Eclipse.
Where is this Notepad project? Is is part of the SDK? If it is I would use File->Import to copy over to your workspace rather than mess with the SDK copy. That is probably why the manifest is missing.
If you would like more help let me know.
PS. You will probably want to reinstall the SDK if the Notepad manifest is missing.
EDIT:
#Joe. I couldn't say why other tutorials worked and others didn't for definite but using the SDK as a workspace is definitely going to end up being programmatic when you are learning. My SDK is separate from my workspace. So, in a brief summary, I would keep the SDK, the Eclipse source and your project workspace in entirely different locations. And we can start from there if you want more help.
Very Simple, you need to clear the workspace... to do this adopt following 2 steps
Right click on your project and select Android Tools and now select Fix project properties
Select Project from menu and now click on clean.
This will work for sure
Re: problem #2...
My apologies if it's inappropriate to cross-post an answer in multiple threads, but it was asked in a couple of places so in the interest of helping novices with the Android environment (of which I'm one) I'm posting it here as well.
I'm using Vista, Eclipse 3.7.0
I don't know what "File | New | Project | Android Project | Create project from existing source" is supposed to do but I couldn't get it to work for a set of unzipped files of a project tutorial I got from elsewhere. I kept getting that error.
I found what did work is:
1) Copy the unzipped file tree for the project to wherever you want it to eventually reside.
2) File | Import | General | Existing Projects into Workspace | Select root directory:
and point it to wherever you put the zipped files, check-box on for the Project that is the one you want, then Finish
Step 2 seems to not actually move the files anywhere (even though the term 'import' implied that to me), but it seems to just make Eclipse aware of where the project is located and it uses the project from that directory.
That seems to work at least for me.
The side bar in eclipse shows a red cross on the title of my project folder but there are no such signs in the directories below it in hierarchy. In which particular file does error exist? How can I know that?
Error log shows: Current file is not a match for the given config.
Sorry I just came across this now, but I've had the same error too, so I'm sure others have. There was a quite a bit easier solution than what you had to do, at least in my case. I had the exact same problem, where my main project said there was an error, so I couldn't debug or run, but there was no apparent error, other than the red X on my main folder.
In order to solve this, I simply closed the project by right-clicking on the main folder, and selected "Close Project". Then, I right-clicked on the closed project, and selected "Delete". Don't worry, this will not delete any files, it will only remove it from the workspace, and will make sure you really want to do that by asking you to confirm. Now, just click on File->Import and select "Existing Projects into Workspace". Choose your parent folder for your app that was erroring, and import it. The few times I've had the phantom error on my main app, this has fixed it each time.
Whether there is an underlying cause and this process simply refreshes something in the workspace, I'm not sure, but at this point this fix is fast enough for me to use it.
Hope this helps next time!
Project -> Clean
Closing project and opening it again fixed it for me.
formed a new workspace and formed a new project. Added each file individually. Now it shows no error.. but still can't figure out what was wrong with thr previous code..? :=(
I faced the same issue..
there was a problem in manifest xml..
the path was not set properly. there may be space in the path..
I just copied the activity tag from other project and pasted in my project and just edited the path in android:name. it worked fine..