用ubuntu系统创建Android项目,手写jni,Cmake编译,CMakeLists 报错:

Parse error.  Expected a newline, got identifier with text "add_library"

 

解决方法:

选中CmakeList.txt, Android Studio 选择 File - Line Separators - LF Unix and MacOs(\n)

 

Ubuntu 手写CMakeLists编译异常

 

是因为ubuntu上Android Studio手动新建CMakeLists.txt系统格式分隔符不一样,导致编译错误

相关文章:

  • 2022-02-07
  • 2021-12-18
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-02-12
  • 2022-12-23
相关资源
相似解决方案