cocos2d-x2.0.3 the problem of creating an Android program missing Java files

Source: Internet
Author: User

Recently updated cocos2d-x2.0.3 version, is an official version, with 2.0.2 than perfect a lot. Just two days before the Win8, decisive with vs2012 practice, currently playing is high, haha. Well, talk to me.

The Win8 is perfect, but it hurts a little bit when you create the Android program, and Eclipse opens the project and the file is missing. Find Src\org\cocos2dx\lib A look, empty, resolute to find hellocpp, meow a microphone, also did not these documents, and then to hello other find, did not, at that time dumbfounded. Start cocos2d Search Cocos2dxactivity.java file, originally you ya hide in \cocos2dx\platform\android\java\src\org\cocos2dx\lib inside, hurriedly handcuff past, compile, over.

said that if here is over, the elder brother is bound to be shot bricks. As a love to toss and love efficient program ape, will inevitably find that there is a second time, the next swollen do it, must start from the root. Well, find Create-android-project.bat file, did not find anything, and then find \template\android, found a copy_files.sh, with the seventh sense of the program ape, I feel played is it.

In the Copy_src_and_jni () function, the Java file is copied using the Cp-rf $HELLOWORLD _root/proj.android/src $APP _dir/proj.android, Helloworld_ ROOT is pointing to $cocos2dx_root/samples/hellocpp, and we've found Java files under Hellocpp, so if we're going to solve this problem, we can put \cocos2dx\platform\android\ Java\src\ the files under the \samples\hellocpp\proj.android\src\, to this problem to resolve.

Finish, and then look at the copy_files.sh, found that the cocosjavalib_root point $cocos2dx_root/cocos2dx/platform/android/java also stored Java code, but did not use, so, The author's intention is to copy the document from here to the project, so hallowed be thy to do it, in Cp-rf $HELLOWORLD _root/proj.android/src $APP _dir/proj.android after the change line plus a paragraph CP-RF $ COCOSJAVALIB_ROOT/SRC $APP _dir/proj.android, so that \samples\hellocpp\proj.android\src\ can not be copied into the file, let it sleep.

I finish, summed up above, I think we program ape will explore, communicate, society will progress, Cocos2d-x will progress. Ah, wash and sleep, and raise the spirit of the West Lake to see fireworks, good night~~~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.