1,git是一个软件工具,可以帮助我们托管代码;
2,github是一个代码脱管服务器,可以在上面放置我们的代码,也可以查看别人的开源代码;
3,git的安装,直接百度git,从百度软件中心安装就好;
4,git命令的简单使用
我的git安装目录C:\Program Files\Git
5,使用git-bash.exe下载github上的代码,编译运行;
假设要运行这个项目https://github.com/android-rooting-tools/android_run_root_shell
根据网页上的Building说明一步步操作就好
step1,打开git-bash.exe,设置ndk的环境变量
export PATH=/G/tools/adt-bundle/android-ndk-r9d
(注意我的ndk安装目录是G:\tools\adt-bundle\android-ndk-r9d,但是git-bash.exe是linux环境,注意路径的转换)
step2,使用git命令复制github上面的项目
git clone –recursive https://github.com/android-rooting-tools/android_run_root_shell
step3,切换到项目下面cd android_run_root_shell;
step4,编译代码ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk
6,git-cmd.exe是windowns环境的命令窗口