编程语言
首页 > 编程语言> > android-如何构建AOSP应用程序?

android-如何构建AOSP应用程序?

作者:互联网

我正在尝试从AOSP构建Camera App.

我正在使用UBUNTU 14.04.

我遵循了官方文档中的指南.最后我执行

make Camera

我收到以下错误.

...
...
including ./system/media/audio_utils/Android.mk ...
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/client/Android.mk ...
including ./system/netd/server/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
make: *** No rule to make target `Camera'.  Stop.
#### make failed to build some targets (33 seconds) ####

1)如何从AOSP源构建特定的应用程序,输出位于何处?输出的格式是什么?是否可以生成.apk文件?

2)是否可以在Android Studio中编辑源代码并进行编译?我知道官方的AOSP页面已经包含了一些有关Eclipse的资源.

解决方法:

我相信您首先需要通过以下方式设置构建环境:

##> source build/envsetup.sh
##> launche <your-device-config>

只有这样,才调用make命令来构建Camera:

make Camera -j8

您的设备应为设备配置之一,例如“ hammerhead”用于Nexus5

标签:android,android-source
来源: https://codeday.me/bug/20191012/1899227.html