前言:
想把android项目的代码从一个电脑移到 另一个没有源代码 的 电脑上,最快的方式是直接编译成自自定义的Sdk。但是仅make sdk 是不够的。
做法:
1.建立以下几个文件夹
2.将源代码路径下 对应的同名文件夹的文件拷贝过来。1.建立以下几个文件夹
[email protected]:~/Desktop/hehehe$ tree device/ -L 1
device/
├── generic
└── sample
2 directories, 0 files
[email protected]:~/Desktop/hehehe$ tree packages/ -L 3
packages/
└── services
└── Car
└── car_product
3 directories, 0 files
[email protected]:~/Desktop/hehehe$ tree prebuilts/ -L 1
prebuilts/
├── android-emulator
├── build-tools
└── go
4.out 文件夹下 只拷贝host ,target文件夹
5.build 文件夹整个拷贝
3. 测试:
(1)source build/envsetup.sh
(2) lunch 你的分支
(3) emulator &
(4) which adb
4.打包文件夹
tar -cvf xxx.tar 源文件
5.解压文件夹
tar -xvf xxx.tar