用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上Android Studio手动新建CMakeLists.txt系统格式分隔符不一样,导致编译错误