Ошибка opencv-3.1.0 при запуске скрипта для build_sdk.py Android - PullRequest
0 голосов
/ 19 марта 2020

Я скачал исходники opencv-3.1.0 и запускаю следующую команду

build_sdk.py C:/Users/Raghu.Vakkalagadda/Downloads/opencv-3.1.0/build C:/Users/Raghu.Vakkalagadda/Downloads/opencv-3.1.0/opencv-3.1.0 --ndk_path C:/Users/Raghu.Vakkalagadda/Downloads/android-ndk-r10e-windows-x86_64/android-ndk-r10e --sdk_path C:/Users/Raghu.Vakkalagadda/AppData/Local/Android/Sdk

Я получаю ошибку при выполнении команды - execute(["ninja", "opencv_engine"]) Может кто-нибудь проверить и сообщить мне, где я я делаю неправильно Ошибка:

 Executing: ['ninja', 'opencv_engine']
[11/12] Generating .build/bin/opencv_engine-debug.apk
FAILED: platforms/android/service/engine/.build/bin/opencv_engine-debug.apk
cmd.exe /C "cd /D C:\Users\Raghu.Vakkalagadda\Downloads\opencv-3.1.0\build\build_service_armeabi-v7a\platforms\android\service\engine\.build && "C:\Program Files (x86)\apache-ant\bin\ant.bat" -q -noinput -k debug -Djava.target=1.6 -Djava.source=1.6 && C:\Users\Raghu.Vakkalagadda\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E touch C:/Users/Raghu.Vakkalagadda/Downloads/opencv-3.1.0/build/build_service_armeabi-v7a/platforms/android/service/engine/.build/bin/opencv_engine-debug.apk"
   [subant] No sub-builds to iterate on
    [javac] C:\Users\Raghu.Vakkalagadda\Downloads\opencv-3.1.0\build\build_service_armeabi-v7a\platforms\android\service\engine\.build\src\org\opencv\engine\OpenCVEngineService.java:91: error: cannot find symbol
    [javac]         for (Field field : R.xml.class.getDeclaredFields()) {
    [javac]                             ^
    [javac]   symbol:   class xml
    [javac]   location: class R
    [javac] C:\Users\Raghu.Vakkalagadda\Downloads\opencv-3.1.0\build\build_service_armeabi-v7a\platforms\android\service\engine\.build\src\org\opencv\engine\OpenCVEngineService.java:95: error: cannot find symbol
    [javac]                 final int id = field.getInt(R.xml.class);
    [javac]                                              ^
    [javac]   symbol:   class xml
    [javac]   location: class R
    [javac] 2 errors
Target '-compile' failed with message 'The following error occurred while executing this line:
C:\Users\Raghu.Vakkalagadda\AppData\Local\Android\Sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.'.
Cannot execute '-dex' - '-compile' failed or was not executed.
Cannot execute '-package' - '-dex' failed or was not executed.
Cannot execute '-do-debug' - '-package' failed or was not executed.
Cannot execute 'debug' - '-do-debug' failed or was not executed.

BUILD FAILED
C:\Users\Raghu.Vakkalagadda\AppData\Local\Android\Sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
C:\Users\Raghu.Vakkalagadda\AppData\Local\Android\Sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.

Total time: 1 second
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "C:\Users\Raghu.Vakkalagadda\Downloads\opencv-3.1.0\opencv-3.1.0\platforms\android\build_sdk.py", line 316, in <module>
    builder.build_engine(abi, engdest)
  File "C:\Users\Raghu.Vakkalagadda\Downloads\opencv-3.1.0\opencv-3.1.0\platforms\android\build_sdk.py", line 188, in build_engine
    execute(["ninja", "opencv_engine"])
  File "C:\Users\Raghu.Vakkalagadda\Downloads\opencv-3.1.0\opencv-3.1.0\platforms\android\build_sdk.py", line 20, in execute
    raise Fail("Child returned: %s" % retcode)
__main__.Fail: Child returned: 1
...