android studio 真机运行的时候gradle 报错 AGPBI: {"kind":"SIMPLE","text":"E
16lz
2021-01-24
原文出处: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.
2 个回复
0不良人 - http://www.bit100.com
我之前遇到过,好象是因为你用Gradle引用别的项目的时候,那个项目依赖了和你相同的包,注释掉重复的,再Build --> Clean project , 之后再Build --> Rebuild Project试试。 2015-07-21 11:03 添加评论 0JimCarter
一般来说是,jar包引用重复导致的。1.在project structure中去掉重复的jar包,
2.如果你的jar包是放到了libs目录中,且在gradle中发现了如下代码:
compile fileTree(include: ['*.jar'], dir: 'libs')
则注释掉即可。
我是用第二种方法解决的,第一种太不好找了
更多相关文章
- React Native使用高德地图定位(适用Android)
- Android(安卓)studio配置Google play服务
- android Studio 码云新建项目
- android 简单的aidl
- Android(安卓)判断程序是否已安装 & 启动另一个程序
- 去除警告 Android(安卓)NDK: WARNING: APP_PLATFORM Android-14
- Android(安卓)将Uri转换成File
- Android(安卓)Gradle库项目和主项目同时多渠道处理
- Android(安卓)编译 ijkplayer