Exporting and running Unity3D project to Android Studio
<p>I want to get logs from Unity Application when its running on Android phone. For this I have to export Android project from Unity3D and run it using Android Studio. I am doing following steps:</p>

<ol>
<li>Export Project from Unity3D by selecting <strong>Google Android Project</strong> options from player settings.</li>
<li>Open Android Studio and Import the autogenerated project from location drive.</li>
<li>Select <strong>Build -> Make Project.</strong></li>
<li>Select <strong>Run -> Run 'ModuleName'.</strong></li>
</ol>

<p>I am getting following errors in Gradle console:</p>

<blockquote>
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>What went wrong: Execution failed for task ':     'ModuleName':transformClassesWithDexForDebug'.
  java.lang.UnsupportedClassVersionError: com/android/dx/command/Main :
  Unsupported major.minor version 52.0  at
  java.lang.ClassLoader.defineClass1(Native Method)     at
  java.lang.ClassLoader.defineClass(ClassLoader.java:800)   at
  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)     at
  java.net.URLClassLoader.access$100(URLClassLoader.java:71)    at
  java.net.URLClassLoader$1.run(URLClassLoader.java:361)    at
  java.net.URLClassLoader$1.run(URLClassLoader.java:355)    at
  java.security.AccessController.doPrivileged(Native Method)    at
  java.net.URLClassLoader.findClass(URLClassLoader.java:354)    at
  java.lang.ClassLoader.loadClass(ClassLoader.java:425)     at
  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)     at
  java.lang.ClassLoader.loadClass(ClassLoader.java:358)     at
  sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
  Exception in thread "main" </p>
  
  <blockquote>
    <p>com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
    'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with
    non-zero exit value 1</p>
  </blockquote></li>
  <li><p>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</p></li>
  </ul>
  
  <p>BUILD FAILED</p>
  
  <p>Total time: 0.788 secs</p>
  
  <p>java.lang.UnsupportedClassVersionError: com/android/dx/command/Main :
  Unsupported major.minor version 52.0  at
  java.lang.ClassLoader.defineClass1(Native Method)     at
  java.lang.ClassLoader.defineClass(ClassLoader.java:800)   at
  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)     at
  java.net.URLClassLoader.access$100(URLClassLoader.java:71)    at
  java.net.URLClassLoader$1.run(URLClassLoader.java:361)    at
  java.net.URLClassLoader$1.run(URLClassLoader.java:355)    at
  java.security.AccessController.doPrivileged(Native Method)    at
  java.net.URLClassLoader.findClass(URLClassLoader.java:354)    at
  java.lang.ClassLoader.loadClass(ClassLoader.java:425)     at
  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)     at
  java.lang.ClassLoader.loadClass(ClassLoader.java:358)     at
  sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
  Exception in thread "main"</p>
</blockquote>

<p>I have been working with Eclipse long ago but never faced this before. Can anyone guide me how to successfully run a Unity-Android project in Android Studio? </p>