androidandroid.mkandroid-rom

make error : No rule to make target


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


Solution

  • 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.