运行我的Android应用程序时Gradle构建失败

时间:2017-07-19 09:14:46

标签: android android-studio build.gradle

我从GIT HUB导入了一个分支并试图运行该应用程序。这需要花费太多时间来构建并最终给我太多错误,例如内存异常。我正在使用android studio 2.2.3。和构建工具版本 25.0.2和JavamaxheapSize是4g。请帮帮我。

提前致谢

Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the build process.
Warning:WARNING: Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
Error:UNEXPECTED TOP-LEVEL ERROR:
Error: java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:  at 
com.android.dx.rop.cst.CstString.utf8BytesToString(CstString.java:81)
Error:  at com.android.dx.rop.cst.CstString.<init>(CstString.java:200)
Error:at`com.android.dx.cf.cst.ConstantPoolParser.parseUtf8(ConstantPoolParser.java:371)
Error:  at com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:262)
Error:  at 
com.android.dx.cf.cst.ConstantPoolParser.parse(ConstantPoolParser.java:150)
Error:  at  `com.android.dx.cf.cst.ConstantPoolParser.parseIfNecessary(ConstantPoolParser.java:124)
Error:  at 
om.android.dx.cf.cst.ConstantPoolParser.getPool(ConstantPoolParser.java:115)
Error:  at 
com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:491)
Error:  at 
com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
Error:  at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
Error:  at 
com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
Error:  at com.android.dx.command.dexer.Main.parseClass(Main.java:772) 
Error:  at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
Error:  at 
com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1700)
Error:  at com.android.dx.command.dexer.Main.processClass(Main.java:755)
Error:  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:723)
Error:  at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
Error:  at   
Error:  at `.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
Error:  at ` 

`com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)        ``

0 个答案:

没有答案