19

I recently cloned the ics-openvpn project: https://code.google.com/p/ics-openvpn/source/checkout

But when I opened the project, it gave me some errors considering these lines not being resolved:

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

I tried searching it on the internet, but I got no clear answer. So my question is: What is 'jetbrains'? How do I resolve this?

Thanks

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
Black Magic
  • 2,706
  • 5
  • 35
  • 58
  • 3
    www.jetbrains.com for one :) as far as the library goes, I cannot give an answer. Guessing it's related to the projected being built with intelliJ (ics = Ice Cream Sandwich?) Don't consider this as an answer - I'm just providing my thoughts. – Nicklas Pouey-Winger Nov 14 '13 at 10:24

2 Answers2

22

@Nullable and @NotNull annotations introduced in IntelliJ IDEA for catching NullPointerException's (NPE's) through the Constant Conditions & Exceptions and @Nullable problem inspections.

The org.jetbrains.annotations project is open-source, hosted at GitHub. A few other annotations are included: @Nls & @NonNls for localization, @PropertyKey for resource bundles, and @TestOnly for testing.

To download the library of annotations, see the GitHub page.

Maven:

<dependency>
    <groupId>org.jetbrains</groupId>
    <artifactId>annotations</artifactId>
    <version>16.0.2</version>
</dependency>
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
danilodeveloper
  • 3,840
  • 2
  • 36
  • 56
2

To solve this issue

Android The import org.jetbrains cannot be resolved

Download the last version of annotations jar http://repo1.maven.org/maven2/com/intellij/annotations/12.0/annotations-12.0.jar

and paste into /libs folder of your project: enter image description here

Jorgesys
  • 124,308
  • 23
  • 334
  • 268