Programmers Sample Guide -- There are not available platforms

Hey all!

I am trying to run the programmers guid samples. I am following the steps in the README from the GitHub project: https://github.com/chukong/programmers-guide-samples.

I am able to successfully execute the following commands:

$ git clone https://github.com/chukong/programmers-guide-samples.git
$ cd programmers-guide-samples/cpp
$ cd proj.android

However, when I run

$ cocos run -p android

I get the following error:

There are not available platforms.

I am assuming this is because I did not perform the following step:

For Android you should have everything if you have the Cocos app installed. If you do not, you can drop the pre-built libraries into  **libs/**  and edit your projects config to reflect this.

These instructions are not very clear. What are the pre-built libraries? Where do I get them? If someone could provide more specific instructions, it would be greatly appreciated.

It may be worthwhile to note that I am able to run the new setup script successfully, for example:

cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR

Kind of at a loss for what the issue is with respects to the samples.

Thanks!

Use Android Studio now.

Could you clarify what you mean? The proj.android directory is not a standard Android Studio project. Opening the proj.android directory with Android Studio does not allow you to build and run the project.

I guess we should update these samples because android ndk changes deprecated the android command-line tool we relied on.

Yeah, that sounds like a good idea, probably should also move away from ant towards a gradle build system if you are targeting Android Studio for the Android development.

Is there a workaround for the time being that I can use to get these projects to run?

Use an older android ndk