Skip to content
This repository was archived by the owner on May 20, 2022. It is now read-only.

Latest commit

 

History

History
29 lines (16 loc) · 887 Bytes

File metadata and controls

29 lines (16 loc) · 887 Bytes

Check_Emulator_In_NDK

  • native代码里判断是否为debug的so,或者release的so, 通过 CMAKE_BUILD_TYPE 或者NDK_DEBUG宏定义 判断是否是release还是debug的包;
CMAKE_BUILD_TYPE 宏参考 build生成的   cmake_build_command.txt 
NDK_DEBUG  宏 参考参考 build生成的          ndkBuild_build_command.txt
  • 在native里 做检查 是否为模拟器,用C调用java,如果是debug的包不做检查是否为模拟器

编译

代码是可以直接run的,如果想要直接debug native代码,请安装SDK里面的插件.

1.android studio 3.0 版本.

2.local.properties文件里增加 一行

ndk.dir=/xxx/xxx/xx

journal:

1.发现机顶盒会被当做模拟器处理。(之后issue作者没有回复,如果遇到同样的问题,请加日志检查函数哪里return了)