Hey Guys! I am trying to compile my project to Android using Android Studio. However, i get one error for all of my classes; That it can’t be found. Picture:
(There are a bunch of other errors like these, they’re just all the same).
What I have
Compile command: cocos compile -p android --android-studio
NDK: r10e
Any help would be appreciated, Thanks!
Hi!
Check your Android.mk file maybe some files are missing
Already did, they are all present, Here is Android.mk
kalipo
February 25, 2018, 1:26pm
#4
Maybe you try to rearrange the order files are listed in LOCAL_SRC_FILES. But I remember it used not to matter
Try add
$(call import-add-path,$(LOCAL_PATH))
after
$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d)
$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d/cocos)
$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d/cocos/audio/include)
Still getting the same errors
Makefile:
Try, LOCAL_SRC_FILES without $(LOCAL_PATH)
For example,
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../../Classes/AppDelegate.cpp \
../../../Classes/HelloWorldScene.cpp
1 Like
Thanks alot! This fixed the errors.
I have seen a bunch of people with these .o errors, so I hope this thread reaches them.
Thanks!