尝试在VS 2017中构建cordova应用程序时收到以下构建输出:
MSBUILD:cordova-build错误:PARSE错误:
MSBUILD:cordova-build错误:不支持的类文件版本52.0
MSBUILD:cordova-build错误:...解析com / google / android / gms / StrictVersionMatcherPlugin.class
MSBUILD:cordova-build错误:1错误;中止
MSBUILD:cordova-build错误:拿起_JAVA_OPTIONS:-Xmx512M
MSBUILD:cordova-build错误:FAILURE:构建因异常而失败。
MSBUILD:cordova-build错误:*出了什么问题:
MSBUILD:cordova-build错误:任务':transformClassesWithDexForDebug'的执行失败。
MSBUILD:cordova-build错误:> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'C:\ Program Files(x86)\ Java \ jdk1.8.0_161 \ bin \ java.exe''以非零退出值1结束
请评论需要哪些附加信息,我将编辑问题。
编辑:未解决。很高兴得到一个解决方案。
没有使用Visual Studio,但只使用了cordova工具,我创建了一个在浏览器,android,windows中运行的示例应用程序 - 其他平台我没有检查。
这是项目:
https://github.com/manoharreddyporeddy/programming-language-notes/tree/master/my-cordova
如果您还没有尝试过,请尝试:
如果使用android studio,请尝试以下方法:
build.gradle
。
在'android'中添加multiDexEnabled true
因为你的method references in your app exceeds the 65K limit
,添加依赖'com.android.support:multidex:1.0.0'
,更新清单android:name="android.support.multidex.MultiDexApplication">
application
,请参阅http://developer.android.com/studio/build/multidex.html
否则,在multiDexEnabled true
中添加defaultConfig
YOUR_APP_NAME\app\build\intermediates
文件编辑:如果不需要android studio,请尝试以下方法:
一些环境相关的事情: 1. https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#requirements-and-support