Ошибка компиляции муравья (не удается найти символ) JAVAC компилятор - PullRequest
0 голосов
/ 21 сентября 2018

Я пытаюсь скомпилировать tesseract ocr library.last. Это ant antiling.but, но у меня есть ошибка, связанная с тем, что я не могу найти такой символ, как

    PS C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two> ant release
    Buildfile: C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\build.xml

    -set-mode-check:

    -set-release-mode:

    -release-obfuscation-check:
         [echo] proguard.config is ${proguard.config}

    -pre-build:

    -check-env:
     [checkenv] Android SDK Tools Revision 25.2.5
     [checkenv] Installed at C:\android sdk

    -setup:
         [echo] Project Name: tess-two
      [gettype] Project Type: Android Library

    -build-setup:
    [getbuildtools] Using latest Build Tools: 21.1.2
         [echo] Resolving Build Target for tess-two...
    [gettarget] Project Target:   Android 4.4.2
    [gettarget] API level:        19
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\bin\rsObj
        [mkdir] Created dir: C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\bin\rsLibs
         [echo] ----------
         [echo] Resolving Dependencies for tess-two...
    [dependency] Library dependencies:
    [dependency] No Libraries
    [dependency]
    [dependency] ------------------
         [echo] ----------
         [echo] Building Libraries with 'release'...
       [subant] No sub-builds to iterate on

    -code-gen:
    [mergemanifest] Found Deleted Target File
    [mergemanifest] Merging AndroidManifest files into one.
    [mergemanifest] Manifest merger disabled. Using project manifest only.
         [echo] Handling aidl files...
         [aidl] No AIDL files to compile.
         [echo] ----------
         [echo] Handling RenderScript files...
         [echo] ----------
         [echo] Handling Resources...
         [aapt] Found new input file
         [aapt] Generating resource IDs...
         [aapt]     (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*')
         [echo] ----------
         [echo] Handling BuildConfig class...
    [buildconfig] Generating BuildConfig class.

    -pre-compile:

    -compile:
        [javac] Compiling 24 source files to C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\bin\classes
        [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
        [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
        [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Pix.java:20: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.ColorInt;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Pix.java:21: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.Size;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Binarize.java:19: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.FloatRange;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Box.java:20: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.Size;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Boxa.java:20: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.Size;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Constants.java:19: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.IntDef;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Constants.java:56: error: cannot find symbol
        [javac]     @IntDef({L_INSERT, L_COPY, L_CLONE})
        [javac]      ^
        [javac]   symbol:   class IntDef
        [javac]   location: class Constants
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Constants.java:79: error: cannot find symbol
        [javac]     @IntDef({L_SORT_INCREASING, L_SORT_DECREASING})
        [javac]      ^
        [javac]   symbol:   class IntDef
        [javac]   location: class Constants
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Constants.java:89: error: cannot find symbol
        [javac]     @IntDef({L_SORT_BY_X, L_SORT_BY_Y, L_SORT_BY_WIDTH, L_SORT_BY_HEIGHT, L_SORT_BY_MIN_DIMENSION,
        [javac]      ^
        [javac]   symbol:   class IntDef
        [javac]   location: class Constants
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Edge.java:19: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.IntDef;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Edge.java:38: error: cannot find symbol
        [javac]     @IntDef({L_HORIZONTAL_EDGES, L_VERTICAL_EDGES, L_ALL_EDGES})
        [javac]      ^
        [javac]   symbol:   class IntDef
        [javac]   location: class Edge
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\JpegIO.java:21: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.IntRange;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\MorphApp.java:19: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.IntDef;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\MorphApp.java:38: error: cannot find symbol
        [javac]     @IntDef({L_TOPHAT_BLACK, L_TOPHAT_WHITE})
        [javac]      ^
        [javac]   symbol:   class IntDef
        [javac]   location: class MorphApp
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Pixa.java:20: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.Size;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Rotate.java:19: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.IntRange;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:22: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.IntDef;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:23: error: package android.support.annotation does not exist
        [javac] import android.support.annotation.WorkerThread;
        [javac]                                  ^
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:60: error: cannot find symbol
        [javac]         @IntDef({PSM_OSD_ONLY, PSM_AUTO_OSD, PSM_AUTO_ONLY, PSM_AUTO, PSM_SINGLE_COLUMN,
        [javac]          ^
        [javac]   symbol:   class IntDef
        [javac]   location: class PageSegMode
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:124: error: cannot find symbol
        [javac]     @IntDef({OEM_TESSERACT_ONLY, OEM_CUBE_ONLY, OEM_TESSERACT_CUBE_COMBINED, OEM_DEFAULT})
        [javac]      ^
        [javac]   symbol:   class IntDef
        [javac]   location: class TessBaseAPI
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:151: error: cannot find symbol
        [javac]         @IntDef({RIL_BLOCK, RIL_PARA, RIL_TEXTLINE, RIL_WORD, RIL_SYMBOL})
        [javac]          ^
        [javac]   symbol:   class IntDef
        [javac]   location: class PageIteratorLevel
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Pix.java:130: error: cannot find symbol
        [javac]     public boolean getDimensions(@Size(min=3) int[] dimensions) {
        [javac]                                   ^
        [javac]   symbol:   class Size
        [javac]   location: class Pix
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Pix.java:302: error: cannot find symbol
        [javac]     public void setPixel(int x, int y, @ColorInt int color) {
        [javac]                                         ^
        [javac]   symbol:   class ColorInt
        [javac]   location: class Pix
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Binarize.java:124: error: cannot find symbol
        [javac]                                             @FloatRange(from=0.0, to=1.0) float scoreFraction) {
        [javac]                                              ^
        [javac]   symbol:   class FloatRange
        [javac]   location: class Binarize
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Binarize.java:190: error: cannot find symbol
        [javac]     public static Pix sauvolaBinarizeTiled(Pix pixs, int whsize, @FloatRange(from=0.0) float factor,
        [javac]                                                                   ^
        [javac]   symbol:   class FloatRange
        [javac]   location: class Binarize
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Box.java:190: error: cannot find symbol
        [javac]     public boolean getGeometry(@Size(min=4) int[] geometry) {
        [javac]                                 ^
        [javac]   symbol:   class Size
        [javac]   location: class Box
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Boxa.java:121: error: cannot find symbol
        [javac]     public boolean getGeometry(int index, @Size(min=4) int[] geometry) {
        [javac]                                            ^
        [javac]   symbol:   class Size
        [javac]   location: class Boxa
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\JpegIO.java:64: error: cannot find symbol
        [javac]     public static byte[] compressToJpeg(Pix pixs, @IntRange(from=0, to=100) int quality,
        [javac]                                                    ^
        [javac]   symbol:   class IntRange
        [javac]   location: class JpegIO
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Pixa.java:359: error: cannot find symbol
        [javac]     public boolean getBoxGeometry(int index, @Size(min=4) int[] dimensions) {
        [javac]                                               ^
        [javac]   symbol:   class Size
        [javac]   location: class Pixa
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\leptonica\android\Rotate.java:106: error: cannot find symbol
        [javac]     public static Pix rotateOrth(Pix pixs, @IntRange(from=0, to=3) int quads) {
        [javac]                                             ^
        [javac]   symbol:   class IntRange
        [javac]   location: class Rotate
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:519: error: cannot find symbol
        [javac]     @WorkerThread
        [javac]      ^
        [javac]   symbol:   class WorkerThread
        [javac]   location: class TessBaseAPI
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:544: error: cannot find symbol
        [javac]     @WorkerThread
        [javac]      ^
        [javac]   symbol:   class WorkerThread
        [javac]   location: class TessBaseAPI
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:567: error: cannot find symbol
        [javac]     @WorkerThread
        [javac]      ^
        [javac]   symbol:   class WorkerThread
        [javac]   location: class TessBaseAPI
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:588: error: cannot find symbol
        [javac]     @WorkerThread
        [javac]      ^
        [javac]   symbol:   class WorkerThread
        [javac]   location: class TessBaseAPI
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:604: error: cannot find symbol
        [javac]     @WorkerThread
        [javac]      ^
        [javac]   symbol:   class WorkerThread
        [javac]   location: class TessBaseAPI
        [javac] C:\Users\-GT-\Desktop\proje\compiling20.09\tess-two-master\tess-two\src\com\googlecode\tesseract\android\TessBaseAPI.java:764: error: cannot find symbol
        [javac]     @WorkerThread
        [javac]      ^
        [javac]   symbol:   class WorkerThread
        [javac]   location: class TessBaseAPI
        [javac] 36 errors
        [javac] 3 warnings

    BUILD FAILED
    C:\android sdk\tools\ant\build.xml:716: The following error occurred while executing this line:
    C:\android sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.

    Total time: 2 seconds

мой файл build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="tess-two" default="help">

    <!-- The local.properties file is created and updated by the 'android' tool.
         It contains the path to the SDK. It should *NOT* be checked into
         Version Control Systems. -->
    <property file="local.properties" />

    <!-- The ant.properties file can be created by you. It is only edited by the
         'android' tool to add properties to it.
         This is the place to change some Ant specific build properties.
         Here are some properties you may want to change/update:

         source.dir
             The name of the source directory. Default is 'src'.
         out.dir
             The name of the output directory. Default is 'bin'.

         For other overridable properties, look at the beginning of the rules
         files in the SDK, at tools/ant/build.xml

         Properties related to the SDK location or the project target should
         be updated using the 'android' tool with the 'update' action.

         This file is an integral part of the build system for your
         application and should be checked into Version Control Systems.

         -->
    <property file="ant.properties" />

    <!-- The project.properties file is created and updated by the 'android'
         tool, as well as ADT.

         This contains project specific properties such as project target, and library
         dependencies. Lower level build properties are stored in ant.properties
         (or in .classpath for Eclipse projects).

         This file is an integral part of the build system for your
         application and should be checked into Version Control Systems. -->
    <loadproperties srcFile="project.properties" />

    <!-- quick check on sdk.dir -->
    <fail
            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
            unless="sdk.dir"
    />


<!-- extension targets. Uncomment the ones where you want to do custom work
     in between standard targets -->
<!--
    <target name="-pre-build">
    </target>
    <target name="-pre-compile">
    </target>

    /* This is typically used for code obfuscation.
       Compiled code location: ${out.classes.absolute.dir}
       If this is not done in place, override ${out.dex.input.absolute.dir} */
    <target name="-post-compile">
    </target>
-->

    <!-- Import the actual build file.

         To customize existing targets, there are two options:
         - Customize only one target:
             - copy/paste the target into this file, *before* the
               <import> task.
             - customize it to your needs.
         - Customize the whole content of build.xml
             - copy/paste the content of the rules files (minus the top node)
               into this file, replacing the <import> task.
             - customize to your needs.

         ***********************
         ****** IMPORTANT ******
         ***********************
         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
         in order to avoid having your file be overridden by tools such as "android update project"
    -->
    <!-- version-tag: 1 -->
    <import file="${sdk.dir}/tools/ant/build.xml" />

    </project>

Я использую последнюю версию Apache Ant.and android api 19. ndk версия r7c как я могу решить эту проблему. Я добавлю папку компиляции javac в мой файл build.xml, чтобы решить эту проблему

спасибо за вашу помощь

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...