-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我使用android studio的CmakeList编译Dobby运行时报错 #277
Comments
Use mine: https://github.com/chiteroman/Dobby And add this to your CMakeLists.txt:
|
谢谢,我找个时间试一下,非常感谢你的回复
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2024年12月14日(星期六) 凌晨4:28
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [jmpews/Dobby] 我使用android studio的CmakeList编译Dobby运行时报错 (Issue #277)
使用我的方法:https://github.com/chiteroman/Dobby
然后将此代码添加到CMakeLists.txt中:
add_subdirectory(Dobby)target_link_libraries(${CMAKE_PROJECT_NAME}私人多比_静态)
-
直接回复此邮件,在GitHub上查看它,或取消订阅.
***@***.*** >
|
Thanks for your project.It works. |
bro, do you known why Dobby lost some code?This made me realize that when compiling the code, there are still many errors that need to be fixed(just talk about this project: jmpews/Dobby) |
version
dobby版本 当前最新版本
ndk 28.0.12674087
cmake 3.31.0
abiFilters arm64-v8a
minSdkVersion 25
targetSdkVersion 30
我的项目路径如下图:
![59db7daa-5ca7-4280-88d5-45827bac8913](https://private-user-images.githubusercontent.com/30923587/393175975-4f265e9b-928a-415a-a07b-80fee094db61.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzExNDAsIm5iZiI6MTczOTI3MDg0MCwicGF0aCI6Ii8zMDkyMzU4Ny8zOTMxNzU5NzUtNGYyNjVlOWItOTI4YS00MTVhLWEwN2ItODBmZWUwOTRkYjYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEwNDcyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNlMzcyZTE4YWMyMmVjNGNlYzcyY2Y4Yjc2MTcxYjJlNjk4YTk1YTU0MTdlYWM0OGIyYzMxNDkyNGRmZDFmYmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.sXkwCItA00kk_B1ivSXjAD2XKYlGw06qOeJyklfUOhA)
![ea133045-bb06-4dd4-9300-b266fc832a4b](https://private-user-images.githubusercontent.com/30923587/393176091-2936a4ba-a957-4c0c-8455-16415fb10e66.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzExNDAsIm5iZiI6MTczOTI3MDg0MCwicGF0aCI6Ii8zMDkyMzU4Ny8zOTMxNzYwOTEtMjkzNmE0YmEtYTk1Ny00YzBjLTg0NTUtMTY0MTVmYjEwZTY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEwNDcyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxMmQzMGE4MmFiMzBiYjYyYzc2ZDMxZjc4NGMyNzQ5ZjcyNjZhYTE0MGZlMWM3YTVjNjBlNmIxZTEwZDg1NjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ESYzb5oI-FmeCUVli_SWOGk5-lwlX3Ix-2Ji09G3Cpw)
/
我的主CMakeList配置如下:
For more information about using CMake with Android Studio, read the
documentation: https://d.android.com/studio/projects/add-native-code.html
Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.5)
Declares and names the project.
project("hooklearn")
set(DOBBY_DIR Dobby)
macro(SET_OPTION option value)
set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()
SET_OPTION(DOBBY_DEBUG OFF)
SET_OPTION(DOBBY_GENERATE_SHARED OFF)
add_subdirectory(${DOBBY_DIR} dobby)
get_property(DOBBY_INCLUDE_DIRECTORIES
TARGET dobby
PROPERTY INCLUDE_DIRECTORIES)
include_directories(
.
${DOBBY_INCLUDE_DIRECTORIES}
$<TARGET_PROPERTY:dobby,INCLUDE_DIRECTORIES>
)
add_library( # Sets the name of the library.
hooklearn
Searches for a specified prebuilt library and stores the path as a
variable. Because CMake includes system libraries in the search path by
default, you only need to specify the name of the public NDK library
you want to add. CMake verifies that the library exists before
completing its build.
find_library( # Sets the name of the path variable.
log-lib
Specifies libraries CMake should link to your target library. You
can link multiple libraries, such as libraries you define in this
build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
hooklearn
但在点击运行android项目时却会报错,报错信息如下:
FAILURE: Build failed with an exception.
Execution failed for task ':app:buildCMakeDebug'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 10s
45 actionable tasks: 2 executed, 43 up-to-date
The text was updated successfully, but these errors were encountered: