I have created new BlankCordovaApp, and simply can't run it on Andorid, i have no problems with running it on Windows. Moreover, i can build and run it manually via cmd:
cordova run android
Visual studio output:
1> ------ Build configuration options: --debug
1> Executing "before_compile" hook for all plugins.
1> ANDROID_HOME=C:\Users\dima-\AppData\Local\Android\sdk
1> JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
1> Reading build config file: E:\dima-\Documents\Visual Studio 2015\Projects\BlankCordovaApp1\BlankCordovaApp1\build.json
1>MSBUILD : cordova-build warning : Note: Some input files use or override a deprecated API.
1> Note: Some input files use or override a deprecated API.
1>MSBUILD : cordova-build warning : Note: Recompile with -Xlint:deprecation for details.
1> Note: Recompile with -Xlint:deprecation for details.
1>MSBUILD : cordova-build error : java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
1> java.lang.UnsupportedClassVersionError com/android/dx/command/Main : Unsupported major.minor version 52.0
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.defineClass1(Native Method)
1> at java.lang.ClassLoader.defineClass1(Native Method)
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
1> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
1> :transformClassesWithDexForDebug FAILED
1>
1> BUILD FAILED
1>
1> Total time: 5.112 secs
1>MSBUILD : cordova-build error : at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
1> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
1> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
1> at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
1> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
1> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
1>MSBUILD : cordova-build error : at java.security.AccessController.doPrivileged(Native Method)
1> at java.security.AccessController.doPrivileged(Native Method)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
1> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
1> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
1>MSBUILD : cordova-build error : at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
1> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
1> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
1>MSBUILD : cordova-build error : at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
1> at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
1>MSBUILD : cordova-build error : Picked up _JAVA_OPTIONS: -Xmx512M
1> Picked up _JAVA_OPTIONS: -Xmx512M
1>MSBUILD : cordova-build error : Exception in thread "main"
1> Exception in thread "main"
1>MSBUILD : cordova-build error : java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
1> java.lang.UnsupportedClassVersionError com/android/dx/command/Main : Unsupported major.minor version 52.0
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.defineClass1(Native Method)
1> at java.lang.ClassLoader.defineClass1(Native Method)
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
1> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
1>MSBUILD : cordova-build error : at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
1> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
1> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
1> at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
1> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
1> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
1>MSBUILD : cordova-build error : at java.security.AccessController.doPrivileged(Native Method)
1> at java.security.AccessController.doPrivileged(Native Method)
1>MSBUILD : cordova-build error : at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
1> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
1> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
1>MSBUILD : cordova-build error : at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
1> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
1>MSBUILD : cordova-build error : at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
1> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
1>MSBUILD : cordova-build error : at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
1> at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
1>MSBUILD : cordova-build error : Picked up _JAVA_OPTIONS: -Xmx512M
1> Picked up _JAVA_OPTIONS: -Xmx512M
1>MSBUILD : cordova-build error : Exception in thread "main"
1> Exception in thread "main"
1>
1>MSBUILD : cordova-build error : FAILURE: Build failed with an exception.
1> FAILURE: Build failed with an exception.
1>
1>MSBUILD : cordova-build error : * What went wrong:
1> * What went wrong:
1>MSBUILD : cordova-build error : Execution failed for task ':transformClassesWithDexForDebug'.
1> Execution failed for task ':transformClassesWithDexForDebug'.
1>MSBUILD : cordova-build error : > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.7.0_55\bin\java.exe'' finished with non-zero exit value 1
1> > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.7.0_55\bin\java.exe'' finished with non-zero exit value 1
CMD output:
E:\dima-\Documents\Visual Studio 2015\Projects\BlankCordovaApp1\BlankCordovaApp1>cordova run android ANDROID_HOME=C:\Users\dima-\AppData\Local\Android\sdk JAVA_HOME=C:\Program Files\java\jdk1.8.0_92 No target specified, deploying to device 'LGH818fdb0daf3'. Reading build config file: E:\dima-\Documents\Visual Studio 2015\Projects\BlankCordovaApp1\BlankCordovaApp1\build.json ======================== ////////////////////// ======================== BUILD SUCCESSFUL Total time: 5.313 secs Built the following apk(s): E:/dima-/Documents/Visual Studio 2015/Projects/BlankCordovaApp1/BlankCordovaApp1/platforms/android/build/outputs/apk/android-debug.apk Using apk: E:/dima-/Documents/Visual Studio 2015/Projects/BlankCordovaApp1/BlankCordovaApp1/platforms/android/build/outputs/apk/android-debug.apk LAUNCH SUCCESS