Pergunta

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

Foi útil?

Solução

@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>

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top