Error:Execution Failed for task ‘:myApp:createDebugMainDexClassList’.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
java -Xmx1024M -cp \android-sdk\build-tools\19.1.0\lib\dx.jar com.android.multidex.ClassReferenceListBuilder myApp\build\intermediates\multi-dex\debug\componentClasses.jar myApp\build\intermediates\multi-dex\debug\allclasses.jarError Code:
1
Output:
Error: Could not find or load main class com.android.multidex.ClassReferenceListBuilder我正在尝试使用multidex库,因为我的应用程序超过了65000方法,因为我正在使用Link描述的外部库,我在mainfest和build.gradle文件中添加了行,任何提示都将不胜感激.谢谢
编辑
几次发布后我得到了这个错误.Error:Execution Failed for task ‘:myApp:dexDebug’.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
\android-sdk\build-tools\21.1.0\dx.bat –dex –no-optimize –multi-dex –main-dex-list myApp\build\intermediates\multi-dex\debug\maindexlist.txt –output myApp\build\intermediates\dex\debug –input-list=myApp\build\intermediates\tmp\dex\debug\inputList.txt
,Error Code:3.Output:
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space我试图增加文件’studio64.exe.vmoptions’中的Xms1024m -Xmx1024m的大小,但它仍然没有帮助,我也尝试在设置>编译器> VM选项Xms1024m -Xmx1024m