androidandroid-sdk-manager

build/core/droiddoc.mk:158 Too many words (5411). Stop


When I try to run make update-api I get this error:

target Static Jar: android-support-v7-mediarouter-jellybean-mr1
(out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter-jellybean-mr1_intermediates/javalib.jar)
target Java: android-support-v7-mediarouter-jellybean-mr2
(out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter-jellybean-mr2_intermediates/classes)
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter-jellybean-mr2_intermediates/classes-jarjar.jar Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter-jellybean-mr2_intermediates/emma_out/lib/classes-jarjar.jar
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter-jellybean-mr2_intermediates/classes.jar
target Static Jar: android-support-v7-mediarouter-jellybean-mr2
(out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter-jellybean-mr2_intermediates/javalib.jar)
target Java: android-support-v7-mediarouter
(out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter_intermediates/classes)
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter_intermediates/classes-jarjar.jar
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter_intermediates/emma_out/lib/classes-jarjar.jar
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-mediarouter_intermediates/classes.jar
target Java: android-support-v7-palette
(out/target/common/obj/JAVA_LIBRARIES/android-support-v7-palette_intermediates/classes)
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-palette_intermediates/classes-jarjar.jar Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-palette_intermediates/emma_out/lib/classes-jarjar.jar
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v7-palette_intermediates/classes.jar
target Java: android-support-v8-renderscript
(out/target/common/obj/JAVA_LIBRARIES/android-support-v8-renderscript_intermediates/classes)
Note: Some input files use unchecked or unsafe operations. Note:
Recompile with -Xlint:unchecked for details. Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v8-renderscript_intermediates/classes-jarjar.jar
Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v8-renderscript_intermediates/emma_out/lib/classes-jarjar.jar Copying:
out/target/common/obj/JAVA_LIBRARIES/android-support-v8-renderscript_intermediates/classes.jar
build/core/droiddoc.mk:158: *** Too many words (5411). Stop.

#### make failed to build some targets (06:10 (mm:ss)) ####

Could you please help me? Thanks in advance.


Solution

  • After wasting a day, this is the answer. So, the number of words in droiddoc is limited to 5000, see @build/core/definitions.mk.

    In my case I had more than 5000, and therefore the error "Too many words" was occurring.

    The solution is to modify the var `dump-words-to-file:

    Before modification:

    # dump-words-to-file, <word list>, <output file>
    define dump-words-to-file
            @rm -f $(2)
            @$(call emit-line,$(wordlist 1,200,$(1)),$(2))
            @$(call emit-line,$(wordlist 201,400,$(1)),$(2))
            @$(call emit-line,$(wordlist 401,600,$(1)),$(2))
            @$(call emit-line,$(wordlist 601,800,$(1)),$(2))
            @$(call emit-line,$(wordlist 801,1000,$(1)),$(2))
            @$(call emit-line,$(wordlist 1001,1200,$(1)),$(2))
            @$(call emit-line,$(wordlist 1201,1400,$(1)),$(2))
            @$(call emit-line,$(wordlist 1401,1600,$(1)),$(2))
            @$(call emit-line,$(wordlist 1601,1800,$(1)),$(2))
            @$(call emit-line,$(wordlist 1801,2000,$(1)),$(2))
            @$(call emit-line,$(wordlist 2001,2200,$(1)),$(2))
            @$(call emit-line,$(wordlist 2201,2400,$(1)),$(2))
            @$(call emit-line,$(wordlist 2401,2600,$(1)),$(2))
            @$(call emit-line,$(wordlist 2601,2800,$(1)),$(2))
            @$(call emit-line,$(wordlist 2801,3000,$(1)),$(2))
            @$(call emit-line,$(wordlist 3001,3200,$(1)),$(2))
            @$(call emit-line,$(wordlist 3201,3400,$(1)),$(2))
            @$(call emit-line,$(wordlist 3401,3600,$(1)),$(2))
            @$(call emit-line,$(wordlist 3601,3800,$(1)),$(2))
            @$(call emit-line,$(wordlist 3801,4000,$(1)),$(2))
            @$(call emit-line,$(wordlist 4001,4200,$(1)),$(2))
            @$(call emit-line,$(wordlist 4201,4400,$(1)),$(2))
            @$(call emit-line,$(wordlist 4401,4600,$(1)),$(2))
            @$(call emit-line,$(wordlist 4601,4800,$(1)),$(2))
            @$(call emit-line,$(wordlist 4801,5000,$(1)),$(2))
            @$(if $(wordlist 5001,5002,$(1)),$(error Too many words ($(words $(1)))))
    endef
    

    After modification:

    # dump-words-to-file, <word list>, <output file>
    define dump-words-to-file
            @rm -f $(2)
            @$(call emit-line,$(wordlist 1,200,$(1)),$(2))
            @$(call emit-line,$(wordlist 201,400,$(1)),$(2))
            @$(call emit-line,$(wordlist 401,600,$(1)),$(2))
            @$(call emit-line,$(wordlist 601,800,$(1)),$(2))
            @$(call emit-line,$(wordlist 801,1000,$(1)),$(2))
            @$(call emit-line,$(wordlist 1001,1200,$(1)),$(2))
            @$(call emit-line,$(wordlist 1201,1400,$(1)),$(2))
            @$(call emit-line,$(wordlist 1401,1600,$(1)),$(2))
            @$(call emit-line,$(wordlist 1601,1800,$(1)),$(2))
            @$(call emit-line,$(wordlist 1801,2000,$(1)),$(2))
            @$(call emit-line,$(wordlist 2001,2200,$(1)),$(2))
            @$(call emit-line,$(wordlist 2201,2400,$(1)),$(2))
            @$(call emit-line,$(wordlist 2401,2600,$(1)),$(2))
            @$(call emit-line,$(wordlist 2601,2800,$(1)),$(2))
            @$(call emit-line,$(wordlist 2801,3000,$(1)),$(2))
            @$(call emit-line,$(wordlist 3001,3200,$(1)),$(2))
            @$(call emit-line,$(wordlist 3201,3400,$(1)),$(2))
            @$(call emit-line,$(wordlist 3401,3600,$(1)),$(2))
            @$(call emit-line,$(wordlist 3601,3800,$(1)),$(2))
            @$(call emit-line,$(wordlist 3801,4000,$(1)),$(2))
            @$(call emit-line,$(wordlist 4001,4200,$(1)),$(2))
            @$(call emit-line,$(wordlist 4201,4400,$(1)),$(2))
            @$(call emit-line,$(wordlist 4401,4600,$(1)),$(2))
            @$(call emit-line,$(wordlist 4601,4800,$(1)),$(2))
            @$(call emit-line,$(wordlist 4801,5400,$(1)),$(2))
            @$(if $(wordlist 5401,5402,$(1)),$(error Too many words ($(words $(1)))))
    endef
    

    and the error is gone. :)