0

I have installed both Android studio and IntelliJ on my Ubuntu(16.04) lap.I have created Nexus_5X_API_24 from Android studio.So i can run Android studio project on that emulator.also i can start that manually from terminal as well (using ./emulator -avd Nexus_5X_API_24).

I have already installed JAVA and Gradle. I have set JAVA_HOME as well

But i cant run IntelliJ project.when i run it,it's showing below error.

enter image description here

i have installed gradle-4.0 inside /opt/gradle.but wen i run gradle -v it showing Gradle 2.10

enter image description here

Tje123
  • 729
  • 17
  • 44
  • Possible duplicate of [Xamarin.Android Proguard - Unsupported class version number 52.0](https://stackoverflow.com/questions/39514518/xamarin-android-proguard-unsupported-class-version-number-52-0) – Amit Vaghela Jun 15 '17 at 11:04
  • 2
    This error has nothing to do with the emulator. It comes because you use something from Java 8 while android supports only Java 6. – Balázs Nemes Jun 15 '17 at 11:09
  • try this answer https://stackoverflow.com/a/43536258/653856 – Raghunandan Jun 15 '17 at 11:09
  • @BalázsNemes what is that mean? – Tje123 Jun 15 '17 at 11:15
  • Sorry my knowledge was a bit outdated. So Java 8 is partly supported in the most recent Android version. But is it still not fully supported. I suggest to try the emulator without installing your app. If it launches then the emulator is OK. The error message says it is a language incompatibility error during the build. It does not look like an emulator issue. May be your app uses some java 8 syntax that is not supported. Or you might be use some 3rd party dependency which was built for Java 8. – Balázs Nemes Jun 15 '17 at 11:36
  • i have tried `gradle -v` then it showing `Gradle 2.10` as the result.but i have downloaded and installed `gradle-4.0`.see my updated post – Tje123 Jun 15 '17 at 17:33
  • Your language target for compilation should be 6, not 8. – m0skit0 Jun 15 '17 at 17:41
  • run the packager first using: react-native start (go to your project directory and then run this command) and then run your android project. – Ankit Aggarwal Jun 15 '17 at 19:08

0 Answers0