# CrossCompileForAndroidUseCommand **Repository Path**: zewen/CrossCompileForAndroidUseCommand ## Basic Information - **Project Name**: CrossCompileForAndroidUseCommand - **Description**: 本例使用ndk已编译好的工具链来交叉编译arm架构的so包 - **Primary Language**: C - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-08-30 - **Last Updated**: 2021-06-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CrossCompileForAndroidUseCommand ### 本例使用ndk已编译好的工具链来交叉编译arm架构的so包, ### 不依赖于android studio 及 gradle,直接用命令行编译。 ``` cd c/build ./configure.sh make ``` 先执行/build 目录下的cofigure.sh脚本, c/build 目录下执行 make clean 再执行 make 命令即可生成so包 ## 本例中编译生成的so文件可以配合另一个名为 `ndktest2` 的android studio工程验证使用, 另外还要注意`c/build/configure.sh`中cpu的架构及路径是否正确 ### 参考: [在命令行下用cmake交叉编译可在android中运行的so包](https://blog.csdn.net/minghuang2017/article/details/78938852)