android studio 真机运行的时候gradle 报错 AGPBI: {"kind":"SIMPLE","text":"Error: C


原文出处:http://ask.android-studio.org/?/question/498
感谢原文作者: yeah258258
app:preDexDebug
AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}

AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}

AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}

AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}

FAILED

FAILURE: Build failed with an exception.
  • What went wrong:
    Execution failed for task ':app:preDexDebug'.
    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_71\bin\java.exe'' finished with non-zero exit value 1
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
2015-07-20 19:31  添加评论  分享
0

不良人 - http://www.bit100.com

我之前遇到过,好象是因为你用Gradle引用别的项目的时候,那个项目依赖了和你相同的包,注释掉重复的,再Build --> Clean project , 之后再Build --> Rebuild Project试试。
0
一般来说是,jar包引用重复导致的。
1.在project structure中去掉重复的jar包,
2.如果你的jar包是放到了libs目录中,且在gradle中发现了如下代码:
compile fileTree(include: ['*.jar'], dir: 'libs')
则注释掉即可。

我是用第二种方法解决的,第一种太不好找了
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值