android.mk file error

hi, i m getting this error when i run my app on eclipse for android “make: * No rule to make target `jni_‘/testcpp/main.cpp’, needed by `obj/local/armeabi/objs-debug/testcpp_shared/testcpp/main.o’.”
what’s wrong with my mk file?
here is my mk file :

TOP_LOCAL_PATH :=$(call my-dir)
include $(call all-subdir-makefiles)
LOCAL_PATH := $(TOP_LOCAL_PATH)

include $(CLEAR_VARS)
LOCAL_LDLIBS:=-llog
LOCAL_MODULE := testcpp_shared
LOCAL_MODULE_FILENAME := libtestcpp
LOCAL_SRC_FILES := testcpp/main.cpp carTest.cpp test.cpp ScreenLayer.cpp track1.cpp GameOverScene.cpp MyContactListener.cpp story.cpp AdvanceSprite.cpp Hello.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/…/…/Classes

LOCAL_STATIC_LIBRARIES := curl_static_prebuilt

LOCAL_WHOLE_STATIC_LIBRARIES := cocos_testcpp_common
LOCAL_WHOLE_STATIC_LIBRARIES = cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES
= cocosdenshion_static
LOCAL_WHOLE_STATIC_LIBRARIES = box2d_static
LOCAL_WHOLE_STATIC_LIBRARIES
= chipmunk_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static

include $(BUILD_SHARED_LIBRARY)

$(call import-module,samples/TestCpp)
$(call import-module,cocos2dx)
$(call import-module,cocos2dx/platform/third_party/android/prebuilt/libcurl)
$(call import-module,CocosDenshion/android)
$(call import-module,extensions)
$(call import-module,external/Box2D)
$(call import-module,external/chipmunk)

(1-2/2)

Reply

ndk can’t find main.cpp.
you can modify “LOCAL_SRC_FILES := testcpp/main.cpp ” to "LOCAL_SRC_FILES := …/…/Classes/testcpp/main.cpp and have a test.

i copied and pasted what you said but having same error…:frowning:

The error is “make: * No rule to make target `jni/…/…/Classes/testcpp/main.cpp’, needed by `obj/local/armeabi/objs-debug/testcpp_shared///Classes/testcpp/main.o’. Stop. org.cocos2dx.testcpp.TestCpp”…:confused:

In my project , proj.android~~>jni~~>test->main.cpp. It’s right to use “LOCAL_SRC_FILES := test/main.cpp”.

BTW, why you dir name is “jni_”, are you rename “jni” to “jni”?

no i did not rename it…i have also proj.android~~>jni~~>testcpp->main.cpp…but the same problem is occurring again n again…:frowning: