帮忙看看编译android平台的opencv 总是报错

SDK initialized in 0 ms
Checking the license for package CMake 3.6.4111459 in /home/tianshaokai/Android/Sdk/licenses
Warning: License for package CMake 3.6.4111459 not accepted.

FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring project ':face-detection'.
com.android.builder.sdk.LicenceNotAcceptedException: Failed to install the following Android SDK packages as some licences have not been accepted.
cmake;3.6.4111459 CMake 3.6.4111459
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio...

Using Android SDK: /home/tianshaokai/Android/Sdk

Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 2s
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "build_sdk.py", line 296, in
builder.build_library(abi, do_install)
File "build_sdk.py", line 185, in build_library
execute(["ninja", "install/strip"])
File "build_sdk.py", line 23, in execute
raise Fail("Child returned: %s" % retcode)
main.Fail: Child returned: 1

Ubuntu 16.04 LTS
My cmake version 3.13.3
NDK android-ndk-r18b
opencv 4.0.1

阅读 5.4k
1 个回答

试一下设置 ANDROID_NDK_HOMEANDROID_HOME 环境变量.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏