Christian Günter
Christian Günter

Reputation: 33

import org.eclipse cannot be resolved

I just installed Eclipse Neon PDE and try to build a simple plugin project with the "Hello World" template. Unfortunately i get many "The import org.eclipse cannot be resolved" errors straight after creating the plugin project.

This is the project with the errors in code and dependencies: Error.

I use Eclipse Neon for RCP and RAP Developers with these plugins: plugins.

I already tried cleaning the project and fiddled around with the build path but without success.

Can anyone help me with this error? Probably I'm missing the obvious.

Upvotes: 3

Views: 15136

Answers (3)

felixh
felixh

Reputation: 399

I fixed my problem by launching the eclipse with "-clean" arguments.

Upvotes: 1

babyinEclipse
babyinEclipse

Reputation: 513

Greg is right. Also check your target platform in Windows->Target Platform->Add. Add default setup there. Please find more details adding target platform @ http://www.vogella.com/tutorials/EclipseTargetPlatform/article.html

Upvotes: 2

greg-449
greg-449

Reputation: 111141

You are missing a number of plug-in dependencies.

You need to add at least:

 org.eclipse.core.runtime
 org.eclipse.core.resources

to your plug-in dependencies list. You will probably have to do a 'Source > Organize Imports' after adding the dependencies to update the imports.

You can always click on the red X at the left of the editor to get possible resolutions of problems - this will often tell you which dependency to add.

Upvotes: 1

Related Questions