I made a HelloWorld app in Eclipse that had no errors and runs fine. It was located in
Android/workspace/HelloWorld
Then I created a Git repo elsewhere in, say
Git/MyApp
I want to have MyApp contain the HelloWorld project from eclipse, and when I make edits to HelloWorld, it will show up in git status and I can commit and push those changes.
I tried copying the HelloWorld directory from the workspace into MyApp, then pushing my changes to my repo, which was fine.
Then I deleted the original HelloWorld in the workspace, went to Eclipse, hit import existing project, and selected the HelloWorld from the MyApp repo. But this resulted in a ton of compilation errors. How can I do what I'm trying to do without all these errors?
I've attached a link to a screenshot of the errors I get upon compilation.
I have Understood your problem,your project have a relationship with appcompact.Whenever you import your project you have to check below scenario,
Right click your project ---->select properties--->In side bar select "Android" Tab--->now you can see Project build target and Library Box--->in Library box click add and choose appcompact project and then click apply.
After done above one clean and build your project.Then it will work fine.
try Clean operation on your project and then build your project. replay whether it solves the issue or not.
As a matter of fact it looks to me like your eclipse doesnt recognize your app-compat anymore.
This happend to me once too, after I closed and reopend the appcompat-project.
Try to close all your projects -> open the appcompat first -> restart eclipse and maybe do a clean on your project
Hope this helps.
Related
I have cloned a Bitbucket project in my Eclipse IDE and I want to debug the project as a remote application.
However, in the debug window (->connect window), the project name is not shown.
Why do I not see it?
I am Attaching Screenshots where you create Debug Configurations for any Remote Java application.
Lets Go step by step:
Within Debug Configuration Window
You right click Remote Java Application > New
In the Connect Tab you browse the project in your Workspace (One you want to debug), Here in my case it is MyApplication
In Source tab You Find below details where you add any dependent projects with the project that you want to debug
When you say Add here, small dialog box comes up and here you can again choose Java Project, that would be one from your workspace.
I think doing this you would find your Project for Remote Debugging.
Hope this helps..!
I didn't see your problems related screenshots, but according to the situation you described, you can try the following method:
On the debugging of threads Right click it
--select Edit Source Lookup Path
--Select Add
--Select the Java Project
--choose the Java Project you worked with then click OK.
The other situation I think about is whether or not you don't have the jar that you're relying on for the project you downloaded
I had same problem. I had imported project as import project from file system. so it was not java or maven project for eclipse i guess.
i just did import as git project and tried again and it worked.
I am building a maven project using Eclipse. When I modify and save the Java file it takes more time to build the workspace. When I open the progress bar it shows Invoking "Maven Project Builder".
I have searched and tried various options but no luck. I even tried to disable the Maven project Builder from the builder option. If I disable this option it doesn't take that much time but when I run the Maven install I get an error due to disabling of Maven project builder. So I re-enabled the Maven Project builder option.
Kindly give me a permanent solution. Thanks in advance!
Sometimes a Maven Project in Eclipse stops working without reason. What I'm used to do in these cases is instead of trying to find the root cause of the problem I simply try do execute a couple of cleaning procedures:
Try clicking on menu Project -> Clean;
Try click with the
right button on the Project in Project Explorer -> Maven -> Update
Project;
Switch to a new workspace -> Import the Maven project
again.
Sometimes your workspace crashes without reason. Instead of wasting mental energy it's better trying to isolate the problem answering questions like:
This problem happens in any workstation or only in mine?
This problem happens in any Eclipse workspace or only in my current Eclipse workspace?
Try this approach and let me know if it works for you. :)
Thanks for your responses.
Finally i got solution for this issue.
I have modified the settings.xml. Instead of pointing my repository path(/server/.m2/repository) in the server level, i have pointed my repository path to local repository(c:\repository). so whenever i gave build it would point my local repository and it would compile my java classes. So now my build is doing very fast.
Newbie question here...I've wrote an application in eclipse and I've added to a private github repo. I went to import the application to a new workspace so I can work out of my github location and not have to constantly copy/paste. When I import the working application as an existing project into Eclipse, everything I've imported gets hit with a "cannot be resolved" error.
I was wondering if their is something I could do to resolve this?
This happens sometimes with Eclipse. Try to clean your project(Project -> Clean). If that doesnt work restart Eclipse.
Another reason could be that you don't have the necessary jar files for your imports. If this is the case then import the jars(Right Click Project -> Properties -> Java Build Path -> Add External Jars).
If you use gradle as the build tool, just run gradle eclipse
When this happens for a single class I used to Ctrl+click on the class (Open Declaration).
Cut the contents. Save it.
Paste the contents back. Save it again.
Since last night, Eclipse hasn't been letting me run any of my projects and gives me the error "Your project contains error(s), please fix it before running it".
This happens regardless of which project I use.
There are no code errors in any projects
There are no missing files (R.java, etc.) or folders (src, res, etc.)
There are no errors in the console (even on verbose) or the error log screen
I've cleaned all the projects, and each individual project many times
I've restarted ADB, Eclipse, and my computer
I have no idea what to do next, so hopefully its fixable.
NOTE: I am using Git, and this occurred after switching to my master branch to export a new update to one of my apps.
Thank you in advance! (:
Edit 1: I have also tried deleting and re-importing the projects before I posted this.
Click Window -> Show View -> Problems, that should show what exactly Eclipse thinks is wrong with your project. Sometimes you can simply delete the problem from that view, and Eclipse believes you everything is fine (yep, weird, I know).
Also, after you switch branches using an external source control tool (one not integrated into Eclipse through a plugin), Eclipse sometimes won't pick up all changes, you'd need to manually refresh the whole project file tree.
If nothing else helps, try setting up a new Eclipse workspace and importing your project there.
check your build paths - there could be jars and dependencies that are outside of the app that need to be opened or imported.
another trick is to edit an xml file, just change one word to intentionally cause an error, save the file, then change it back to proper syntax and save again. Error magically disappears.
another trick is to edit a java file, (cause error, save, fix error, magically error free)
I had this problem and I have fixed it. My issue was this:
I somehow managed to require another project in my build. That project had errors in it, which I believe is what caused the issue. I think this happened when I accidentally asked Eclipse to fix my build path or something when I was trying to fix a mistake. To correct this issue go to (on mac):
Right click on your project folder in the Package Explorer
In the menu, go to "Build Path"
Select "Configure Build Path"
Go to the "Projects" tab (along the top).
Is there anything in there? If there is and you weren't expecting there to be, select the project that is in that folder and hit "Remove"
This fixed the issue for me. Hope it helps.
I think you need to clean your project. Do project -> clean. Should work fine after that.
Try using Project->Android Tools->Fix Project Properties besides checking for your Android path. Check if your ANDROID_HOME and ANDROID_SDK are set correctly besides adding tools and platform-tools are set correctly in environment variable PATH.
Hope this helps!
Go to your .android folder and delete your debug certificate.
E:\Users\(your profile)\.android
Inside that folder there is a file name 'debug.keystore'. Delete that, clean and try to build the project again. Sometimes this error is caused when the certificate expires.
I found this answer here and it solved my problem ;-)
I think go to project ->clean some error can be solve this problem
Go to Projects in the menu bar
Then check the menu Build Automatically.
This helped for me.
I'm trying to debug my Java application in Eclipse however when I hit a breakpoint I simply see the following instead of my source:
If I change the stack frame in the Debug window then I can see the function name change in the tab - this is definitely my code, the line number is correct and I'm using the latest build but I still can't get Eclipse to show the source (despite it being open in another tab!)
I'm new to Eclipse and so I'm struggling to find my way around, but everything that I've stumbled across so far seems fine to me.
What might cause this to happen and how can I fix it?
Sounds like the 'source lookup path' section if you edit the debug configuration isn't setup correctly?
Click on "Edit Source Lookup Path" button and then click on Add button then Java Project and include your imported project .. Hope this will solve your problem
I also had this issue in MyEclipse Blue. I resolved it by following these steps:
Debug the project.
Right click on the Thread (Which you will see in Debug tab) and click on the "Edit Source lookup"
New window will open and hit the "Add" button and Select the "Java Project".
Get all the project that is listed over there.
Restart your server.
I had similar problem with my eclipse maven project. I fought with this issue quite a long time then I tried to rebuild projet with
mvn clean eclipse:eclipse
and it helped.
When I faced this problem for the very first time, I've already done all the steps mentioned here. Curiously, my problem happened when I've copied a project into another place. Anyway, the debug starts to work without warnings, after simply remove all breakpoints that was originated from the original project.
Sorry about my English , I'm not fluent.
We had the same problem and none of the suggestions above worked. What did work, was deleting the local workspace and from Eclipse checking out from the repository again. The problem occured for everybody previously working with Netbeans and making the switch to Eclipse.
Try this:
Select Project
Right click
debug
Debug configuration
Select Source Tab
Click on add button
Select Java Project
Add your project there with check box
For local projects I've solved it by selecting the "Resolve Workspace artifacts" checkbox in the Debug Configurations.
This is a common error while debug in eclipse. You can fix it through edit source look up. But make sure once you attach the Project You need to stop the server and again start in Debug mode. It will work.
Here is the detail steps :
Click on "Edit Source Lookup Path" button .
Then click on Add button.
Select Java Project and include your imported project
Then stop the server and start it in Debug mode and hit your service. It will work.
After trying most of the solutions here, try this too once -
Close all the .java files from the editor, in fact, close all unrelated projects in eclipse.
And try running the Debugger.
I solved this problem by adding the class file into the src folder within the project. Hope this method may help.
I got this error when I was running my server using a maven tomcat plugin. When I deployed using my configured server in Eclipse (generating a war file and copying it into my tomcat directory), I didn't have this issue anymore.
In your debug configuration add goals as "clean install"in the maven build con
This is an expansion on JAB's answer:
Click "Edit Source Lookup..." > Add... > Workspace Folder > Project > select your folder > check Search subfolders box > OK.
In Eclipse:Window-->Go to preferences-->Java-->Click on JRE-->Edit--->Restore Default and click on Finish.
Update your Project before Debugging the code!
Alas! It worked for me.
This occurred to me when my working git branch is updated from code in master branch. I have already run mvn clean install after the pull, but seems I had to update projects after the maven build so that project source code and JAR build code gets synchronized.
Right click on your project -> Maven -> Update Project, then select all the
maven modules available and press OK. This resolved the issue for me.
I was facing same issue. After banging my head for several hours, I finally noticed that although Maven was building the project successfully, the source file I was trying to step into had an incorrect package statement and that is why the 'Source Not Found' eclipse problem was happening. When I corrected the package statement and rebuilt the project, the debugger found source file and stopped on my breakpoint.