使用studio编译中遇到的两个的错误_'D:\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 1 等

这篇博客介绍了在使用Android Studio编译项目时遇到的两个常见错误:一是'D:jdk1.7.0_80injava.exe' finished with non-zero exit value 1,这可能是由于JDK版本与SDK编译版本不兼容导致,尝试降低build_tool_version可以解决;二是内存不足问题,Gradle提示需要增加最大堆大小到2048MB以上,可以在grade.properties中设置org.gradle.jvmargs=-Xmx2048M来解决。
摘要由CSDN通过智能技术生成
错误1

在1.5的studio中遇到 

可能jdk版本和sdk编译版本不兼容


使用低版本的build_tool_version可以解决



Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2340Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app: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(LauncherHelpe
引用\[1\]:Execution failed for task ':core:Kafka.main()'. > Process 'command 'C:/Program Files/Java/jdk1.8.0_77/jre/bin/java.exe'' finished with non-zero exit value 1 。 引用\[2\]:碰到的问题: 1)运行javamain方法出现 Process ‘command ‘D:/jdk8/bin/java.exe’’ finished with non-zero exit value 1 将idea的gradle按如下设置 2)Failed to apply plugin \[id ‘com.gradle.build-scan’\] What went wrong: An exception occurred applying plugin request \[id: ‘com.gradle.build-scan’, version: ‘1.8’\] 。 引用\[3\]:Open File(spring-beans\spring-beans.gradle ) 点击:Open File 然后注释掉 //compileGroovy.dependsOn = compileGroovy.taskDependencies.values - ‘compileJava’ 。 问题:Process 'command 'D:/JDK8/bin/java.exe'' finished with non-zero exit value 1 回答: 出现"Process 'command 'D:/JDK8/bin/java.exe'' finished with non-zero exit value 1"的错误通常是由于Java程序在执行过程遇到了问题导致的。这个错误可能有多种原因,比如代码错误、依赖问题或者环境配置错误。根据提供的引用内容,有两个可能的解决方案。首先,你可以检查你的代码,确保没有语法错误或逻辑错误。其次,你可以检查你的依赖项和环境配置,确保它们正确设置。如果问题仍然存在,你可以尝试注释掉一些代码或者调整一些配置,以便找到问题的根本原因。希望这些解决方案能帮助你解决这个问题。 #### 引用[.reference_title] - *1* [kafka Process ‘command ‘/jdk1.8.0_77/jre/bin/java.exe finished with non-zero exit value 1](https://blog.csdn.net/qq_31686241/article/details/125113723)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [IDEA导入spring5.1源码的构建](https://blog.csdn.net/qq_40088250/article/details/104219666)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值