org.apache import cannot be resolved - java

I know that this error has been queried many times. I've read these posts, but I still cannot get this to work. I have this error:
The import org.apache cannot be resolved
You can see here that I have included the .jar file in my build path. I got this jar file here and I am using Java 7.
I've also cleaned the project and restarted Eclipse. Can anyone suggest what I should try next? Thank you!

Go to Eclipse -> Preferences search for target platform, press Restore Defaults, press Apply and then press Reload.

Related

My spring-boot program doesn't have the JavaBuilder in the Properties

I loaded a project on Spring-tool Suite but I realized that it does not correct the errors. Going to see Properties I realized that all the parameters related to the JavaBuilder that I have in the other loaded projects were missing. I think it's a Jdk problem, but I don't know how to set everything up or how to reset the project in order to have the error corrected.
thanks to anyone who can help me!
I think you need to delete the .metadata folder in your workspace.
The problem was Spring-Tool itself which had a bug where it didn't show any kind of error. There are two ways to get around the problem: delete the project from Spring-boot, delete the Workspace and reload everything. In case it is also recommended to download Spring-boot tool Suite again. In the second case it could be an error importing the project, try to import it to Intellij or another IDEE and see if you have the same problems. If you have the same problems it is a problem of loading the java libraries. To solve it you should open another project where you have no problems and once opened, go to FILE-> NEW-> IMPORT PROJECT and import your project.

Eclipse cannot resolve to a type after import

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.

Import com.facebook.android.R; not found

Hi there I am trying to impor the facebook sdk project into Eclipse EE Kepler but I always get this stupid error about the import that doesn't found..
import com.facebook.android.R;
I already deleted project and add it again..
I already comment the classes with errors to see if the file would be generated..
I already restarted eclipse..
I already right-clicked the project and select Android Tools > Fix Project Properties
I already clean the problem..
Any thoughs on how to fix this?
Thanks alot in advance..
The problem was that I didn't had the Android SDK Build-tools installed on my eclipse, installing the last version solved the problem. The Gen files are now generated :)
Thanks everyone for the help
I think there is problem with any of your .xml file's error. Just check your res/layout folder. It must be showing error. Open that appropriate .xml file that shows the error. May be your missing some of your resources. Try to solve that error and then clean the project and it's done.

Eclipse - Android Project from existing Code does not work

i'm trying to import a folder with an existing project in Eclipse, but it wont't work.
CTRL + N --> Android Project from existing code --> give folder directory --> Finish
Once i try that, nothing happens. Nothing loads, Eclipse doesn't give me an error output, just nothing. Odd thing is that it just happens like that on one single project. When i try to import other projects, everything works just fine.
I am a 100% certain that my project is not corrupted or anything. I just removed it from the Package Explorer and now it won't work anymore.
Thank for your help :)
Once try this:
File->Import->General->Existing
Projects into Workspace, Next
Select root directory: /path/to/project
Projects->Select All
UNCHECK both "Copy projects into workspace" and "Add project to working sets"
Finish
If you just removed the Project from Project Explorer, then Eclipse specific files (.project and .classpath) must be still there. Try to import it as existing Eclipse project: Import -> Existing Projects into Workspace.
I had this problem recently. As it turns out, the AndroidManifest.xml contained a duplicated entry (syntax error), causing a parse failure when Eclipse tried to decode it.
After I found the duplicate line, removed it, and re-added the project to my workspace, it showed up in Package Explorer just fine.
Hope it helps.
For my case there was a problem in manifest . Check whether Manifest is proper or not or any other Xml file has any sort of problem .

Eclipse missing imports (javax.media.* and com.sun.media.*)

I have this old java applet that i need to debug, yet i have some problems with import.
The import javax.media.* cannot be resolved.
The import com.sun.media.* cannot be resolved
After some research i tried adding this external libs to the project - with no success.
sun-jai_codec.jar from http://www.java2s.com/Code/Jar/s/Downloadsunjaicodecjar.htm
installed JMF2.1.1e and added the jmf.jar.
I had no luck with this... so im asking some one for a little help!
Just build the path of your project again. Right click on the project and then select build path--->configure build path--->java build path---->libraries
select all jars and then remove and then add all jars including the jars of your project.
then click ok. then go to order and export and click all the options. then click ok.
Sheez .. this was stupid.
Its a big MESS with this old classes/jar files.
It turned out i had the wrong ones...
Found them here (links in the answer):
Where can I download Jai and Jai-imageio?

Categories

Resources