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.
Finally I solved.
The target platform wasn't selected.
Paolo.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With