问题
I need to add a new app that I wrote in Eclipse to the /packages/apps
folder in Android AOSP. But after the copying the app folder into that directory, building, and rebooting Android, I don't see my app in the launcher.
I see that the Android.mk
file is missing. I want to ask what is the simplest Android.mk
that could be written for a Eclipse project to make it compile. I tried the following (I put the file in the app's directory)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := MyApp
include $(BUILD_PACKAGE)
I don't see any compilation errors, but still I don't see it in the launcher.
Can anyone tell what is missing in my Android.mk
file? (I took the code from the Soundrecorder app)
Is there any other file that needs to be edited to include an app into /packages/apps
folder ?
回答1:
The steps are as follows:
- Place
MyApp
folder under/packages/apps
. - Add
Android.mk
to/packages/apps/MyApp
(yours should work). Add
MyApp
entry toPRODUCT_PACKAGES
in the target product.mk
file under /build/target/product (missed the step). E.g. when building forsdk
, the entry insdk.mk
isPRODUCT_PACKAGES := \ ... \ SomeApp \ MyApp
来源:https://stackoverflow.com/questions/24857285/android-aosp-adding-app-to-packages-apps