要构建SDK,您应该运行以下命令:
make update-api
make sdk
由于Android的API已被修改,命令make update-api添加了新的API.命令make sdk在out文件夹中创建SDK.
然后,要使用新SDK开始在Eclipse中开发应用程序,您应该添加这个新的SDK.有两种可能性.第一个来自“嵌入式Android”一书.我将在这里复制它:
Assuming you had already configured Eclipse for Android development
using the in‐ structions at 07000, you’ll need
to carry out two additional steps to use your newly-built SDK. First,
you’ll need to tell Eclipse the location of the new SDK. To do so, go
to Window→Preferences→Android, enter the path to the new SDK in the
”SDK Location” box, and click OK. Also, for reasons that aren’t
entirely clear to the author at the time of this writing, you also
need to go to Window→“Android SDK Man‐ ager”, deselect all the items
that might be selected except the first two under “Tools” and click on
“Install 2 packages…” Once that is done, you’ll be able to create
new projects using the new SDK and access any new APIs you expose in
it. If you don’t do that second step, you’ll be able to create new
Android projects, but none of them will resolve Java libraries
properly and will, therefore, never build.
至于第二个,它是:
>找到你的新构建sdk zip(对于Linux它可以在这里找到出/主机/ Linux的86 / SDK /)>将此包解压缩到一个文件夹中>在此文件夹中,您可以找到被调用的目录平台/ Android的2.3.3>将文件夹android-2.3.3重命名为< your_name>>将此文件夹复制到以下安装位置你的SDK Manager:android-sdk-linux / platforms>在此文件夹文件build.prop中查找并分配给该属性ro.build.version.sdk任何负数:ro.build.version.sdk = -10>现在运行SDK Manager,您会注意到添加了新的sdk.只需创建新的Eclipse项目并选择此sdk作为目标.