Android compilation fails. No rule to make target cocos2d/cocos/editor-support/cocostudio/CCActionFrame.cpp

When I’m issuing a command:

cocos compile -p android --android-studio

Here is the message I get during the compilation of a project:

make: *** No rule to make target /Users/xxx/Projects/xxx/proj.android-studio/../cocos2d/cocos/editor-support/cocostudio/CCActionFrame.cpp', needed byobj/local/armeabi/objs-debug/cocostudio_static/CCActionFrame.o’. Stop.
Error running command, return code: 2.

What could cause the problem?

I’ve added an enumeration (Node::ZOrder) to the cococs2d::Node class.
Can it cause the problem? Do I have to rebuild the cocos after that maybe?
How to rebuild the cocos libraries?

In Xcode I’m getting no errors, maybe because all the source (game source as well as cocos2d source) is compiled from the project.

I had the same problem when I switched frameworks, here is what I did:

I accessed the obj folder:

(for me it was: C:\Users\User\Documents\GitHub\GetToTheLander\proj.android\obj)

Then I deleted the “local” folder inside of the obj folder. This allowed for a clean build.

I hope this helps, I was stuck on this for a while

5 Likes

Thank you @kamonson ! I had the same problem and your help is good for me. It worked. Thank you so much!

thanks for your help!!

thanks! it’s work for me

Works for me. It take me some time to find this solution. Thanks

It took me a whole day to find this answer. I was so happy, I decided to create an account just to be able to
tell you that you rock!

Thanks a billion!