2015-09-24 67 views
3

我最近在我的項目中添加了一個新模塊。該模塊是:https://github.com/boxme/SquareCamera但是當我將活動添加到我的清單中時,我生成我的應用程序時出現以下錯誤。當我不將它添加到我的清單時,不會發生此錯誤。我試圖通過使用gradle來添加模塊,並且只是將文件包含在我的項目中,但在兩種方式中我都會遇到錯誤。- 增量不支持--multi-dex

Error:Execution failed for task ':app:dexDebug'. 
> com.android.ide.common.internal.LoggedErrorException: Failed to run command: 
    /Users/bartbergmans/Development/Android SDK/build-tools/23.0.0/dx -JXmx4g --dex --incremental --no-strict --no-optimize --multi-dex --main-dex-list /Users/bartbergmans/apps/eCook/app/build/intermediates/multi-dex/debug/maindexlist.txt --multi-dex --output /Users/bartbergmans/apps/eCook/app/build/intermediates/dex/debug --input-list=/Users/bartbergmans/apps/eCook/app/build/intermediates/tmp/dex/debug/inputList.txt 
    Error Code: 
    1 
    Output: 
    --incremental is not supported with --multi-dex 
    usage: 
     dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals] 
     [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict] 
     [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-width=<n>] 
     [--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-library] 
     [--num-threads=<n>] [--incremental] [--force-jumbo] [--no-warning] 
     [--multi-dex [--main-dex-list=<file> [--minimal-main-dex]] 
     [--input-list=<file>] 
     [<file>.class | <file>.{zip,jar,apk} | <directory>] ... 
     Convert a set of classfiles into a dex file, optionally embedded in a 
     jar/zip. Output name must end with one of: .dex .jar .zip .apk or be a directory. 
     Positions options: none, important, lines. 
     --multi-dex: allows to generate several dex files if needed. This option is 
     exclusive with --incremental, causes --num-threads to be ignored and only 
     supports folder or archive output. 
     --main-dex-list=<file>: <file> is a list of class file names, classes defined by 
     those class files are put in classes.dex. 
     --minimal-main-dex: only classes selected by --main-dex-list are to be put in 
     the main dex. 
     --input-list: <file> is a list of inputs. 
     Each line in <file> must end with one of: .class .jar .zip .apk or be a directory. 
     dx --annotool --annotation=<class> [--element=<element types>] 
     [--print=<print types>] 
     dx --dump [--debug] [--strict] [--bytes] [--optimize] 
     [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step=<step>] 
     [--width=<n>] [<file>.class | <file>.txt] ... 
     Dump classfiles, or transformations thereof, in a human-oriented format. 
     dx --find-usages <file.dex> <declaring type> <member> 
     Find references and declarations to a field or method. 
     declaring type: a class name in internal form, like Ljava/lang/Object; 
     member: a field or method name, like hashCode 
     dx -J<option> ... <arguments, in one of the above forms> 
     Pass VM-specific options to the virtual machine that runs dx. 
     dx --version 
     Print the version of this tool (1.11). 
     dx --help 
     Print this message. 

編輯:

我在我的dexOptions增量設置爲false固定它。這是一個很好的決定嗎?

+1

我不知道,但錯誤的工作dexOptions。謝謝。 – VAdaihiep

回答

0

我通過在我的dexOptions中將incremental設置爲false來修復它。