0

I'm trying to use the @Contract annotation of IntelliJ but in Android Studio. I can't import it, it's not there. On the website explaining it, it's said to add <installation folder>/lib/annotations.jar to the project's classpath using the Project Structure dialog, however I didn't found how to that.

Is there anyway to use the @Contract annotation on Android Studio?

Nicolas
  • 6,611
  • 3
  • 29
  • 73
  • The annotation jar is available in [maven repository](https://mvnrepository.com/artifact/org.jetbrains/annotations/13.0). Try to include `compile group: 'org.jetbrains', name: 'annotations', version: '13.0'` in your build.gradle file. – Andrey Feb 03 '18 at 08:21

1 Answers1

3

The annotations jar is available in maven repository. Just add compile group: 'org.jetbrains', name: 'annotations', version: '13.0' in your build.gradle file.

Andrey
  • 15,144
  • 25
  • 91
  • 187