make error : No rule to make target

2.8k views Asked by At

I am trying to add an application into the android custom rom. While running the make command I get this error:

*** No rule to make target packages/apps/MyApp/AndroidManifest.xml', needed byout/target/product/msm8996/obj/APPS/MyApp_intermediates/package.apk'. Stop

Here is my Android.mk file

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

# Build all java files in the java subdirectory
LOCAL_SRC_FILES := $(call all-subdir-java-files)

# Name of the APK to build
LOCAL_PACKAGE_NAME := MyApp

# Tell it to build an APK
include $(BUILD_PACKAGE)

Please help me to fix this error

2

There are 2 answers

0
Mercury On BEST ANSWER

In most cases the 'No rule to make target' error is caused due to compiler expecting to compile a file but the file is not there.

Check that you indeed have the AndroidManifest file spelled correctly + in the correct directory specified in the error.

0
Berkay92 On

Try to use this;

LOCAL_SRC_FILES := $(call all-java-files-under, src)