dobby版本:最新版本
设备平台:android13
dobby编译方式:android studio中使用cmake
cmake脚本:
cmake_minimum_required(VERSION 3.22.1)
set(DobbyHome /Users/king/git_src/nDobby/Dobby)
enable_language(C ASM)
include_directories(
dlfc
utils
)
# Declares and names the project.
project("mymodule")
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
mymodule
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
native-lib.cpp
utils/parse.cpp)
# 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 the name of the NDK library that
# you want CMake to locate.
log)
# 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.
mymodule
dobby
# Links the target library to the log library
# included in the NDK.
${log-lib})
#设置路径,引入Dobby
include_directories(
${DobbyHome}/include
${DobbyHome}/source
${DobbyHome}/builtin-plugin
${DobbyHome}/builtin-plugin/ApplicationEventMonitor
${DobbyHome}/builtin-plugin/BionicLinkerUtil
${DobbyHome}/builtin-plugin/ImportTableReplace
${DobbyHome}/builtin-plugin/ObjcRuntimeReplace
${DobbyHome}/builtin-plugin/AndroidRestriction
${DobbyHome}/builtin-plugin/SymbolResolver
${DobbyHome}/builtin-plugin/SupervisorCallMonitor
${DobbyHome}/external/logging
)
macro(SET_OPTION option value)
set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()
SET_OPTION(DOBBY_DEBUG ON)
SET_OPTION(DOBBY_GENERATE_SHARED ON)
SET_OPTION(Plugin.LinkerLoadCallback OFF)
add_subdirectory(/Users/king/git_src/nDobby/Dobby dobby.build)
if(${CMAKE_ANDROID_ARCH_ABI} STREQUAL "arm64-v8a")
add_definitions(-DCORE_SO_NAME="${LIBRARY_NAME}")
elseif(${CMAKE_ANDROID_ARCH_ABI} STREQUAL "armeabi-v7a")
add_definitions(-DCORE_SO_NAME="${LIBRARY_NAME}")
endif()
问题:
想使用SupervisorCallMonitor插件,调用supervisor_call_monitor_register_main_app函数时,发现报错,error: unknown type name ‘DBICallTy’,在dobby源码中搜索,也没找到DBICallTy相关的定义。谷歌搜索也没找到该类型的定义。请问这个插件如何使用的