Reputation: 10075
I'm using Eclipse Mars (latest version) to create an OSGI bundle with an Activator class. For this, I'm using the Plug-In Project selecting "OSGI framework" to "standard" (but if I select "Equinox" I had same result) on creation. The Activator class is empty for now but the compiler already raises me following errors :
The import org.osgi cannot be resolved BundleActivator cannot be resolved to a type BundleContext cannot be resolved to a type
Why ?
Thanks, Paolo.
Upvotes: 5
Views: 5765
Reputation: 11
To fix this, i have added the dependencies in the manifest file of the project
Go to META-INF Folder in your project where your are getting the error --> MANIFEST.MF --> Dependencies --> Required Plugins --> Search and Add all the OSGI Plugins there and save it
Upvotes: 1