Build dynamic library for project fails! - android cocos - cocos2d-x

Im new to cocos2d and trying to build the android project for first time in mac OS maverics.
I have downloaded the new version of cocos2dx3.2 android SDK NDK v9 and the ANT.
When im going to build the project is shows a error like
Build dynamic library for project [ /Users/Lahiru/Desktop/Cocos/cocos2dx/build/../tests/cpp-tests/proj.android ] fails!
my .bashprofile is like this
# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x
export COCOS_CONSOLE_ROOT=/Users/Lahiru/Desktop/Cocos/cocos2dx/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH
# Add environment variable NDK_ROOT for cocos2d-x
export NDK_ROOT=/Users/Lahiru/Desktop/Cocos/androidndkr9
export PATH=$NDK_ROOT:$PATH
# Add environment variable ANDROID_SDK_ROOT for cocos2d-x
export ANDROID_SDK_ROOT=/Users/Lahiru/Desktop/Cocos/adtbundle/sdk
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH
# Add environment variable ANT_ROOT for cocos2d-x
export ANT_ROOT=/Users/Lahiru/Desktop/Cocos/apacheant194/bin
export PATH=$ANT_ROOT:$PATH
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
Can anyone guide me what did I missed?
Thanks

try switch from ndk9b to ndk9d.
the recent version of cocos2dx made a switch from ndk9b to ndk9d.

Related

Can we exclude tsconfig.spec.json from an angular application

I'm a newbie in Angular. I came across the files tsconfig.app.json, tsconfig.spec.json when angular app was installed using Angular-CLI and found the following point useful from this link.
Both tsconfig.*.json files are for TypeScript configuration.
tsconfig.app.json is used for compiling the code, while
tsconfig.spec.json for compiling the tests.
My doubt is, can we completely exclude tsconfig.spec.json file if we are not using any test environment? Or is tsconfig.spec.json mandatory?
If you don't use tests, feel free to remove tsconfig.spec.json.
Actually you can generate a new angular app without setting up test environment (karma, protractor and *.spec.ts files)
for #angular/cli version 7,8,9 the command is:
ng new --minimal=true --skipTests=true your-app-name
for #angular/cli version 6:
ng new --minimal --skip-tests your-app-name
This will remove unnecessary complexity from configuration files which is a nice thing if you just started learning angular.
Yes use when create your component or service using ng g c --skipTests=true

how to merge both cpp and js support in cocos2d to use via command prompt

How can I create the C++ project and create the js project using the same console?
I download cocos2d-x 3.6 for cpp and cocos2d-js 3.6.1 for js support and had extracted the zip and run
setup.py contained in both.
But , When i run the command
C:/>cocos new myJsGame -l cpp
It gives the error:
Fatal: can't find any template for language in C:\cocos2d-js v3.6.1\templates
You can specify the path of cocos2d-x by argument '-e'.
I Know that for using cpp support i must specify the cocos2d-x path for cpp which i had downloaded.
But is there any way by which i could use both cpp and js in console without specifying the path always when creating a new cocos project.
copy cpp-template-default and cocos2dx_files.json from cocos2d-x v3.6/templates to cocos2d-js v3.6.1/templates.
i tried,and it works.
cocos new -l js should create a new JS project with also the JS-bindings for Android and windows, including C++ sources.

How-to convert csb to ccbi file on Windows?

all!
I have some example files (csb) from Cocos2d Studio.
I want to run them on cocos2d-xna framework, but it requires only compiled files (ccbi).
How can I compile or conver csb under Windows or run sprite from csb file :)
Thanks!

Set NDK_MODULE_PATH for cocos2d-x

I am deploying my cocos2d-x project in Android Platform. I am getting the following error:
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
I think there is some problem in setting the path. Can anyone please help me in resolving this issue? I am working in Mac.
If you ran setup.py this would have made changes for you.
you chould edit your .bash_profile to add something like:
####################################
# Cocos2d-x and Android Development
###################################
# Cocos2d-x console
export COCOS_CONSOLE_ROOT=/Users/jtsm/Chukong-Inc/cocos2d-x/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH
# Add environment variable NDK_ROOT for cocos2d-x
export NDK_ROOT=/Users/jtsm/Chukong-Inc/AndroidDev/android-ndk-r9d
export PATH=$NDK_ROOT:$PATH
# Add environment variable ANDROID_SDK_ROOT for cocos2d-x
export ANDROID_SDK_ROOT=/Users/jtsm/Chukong-Inc/AndroidDev/adt-bundle-mac-x86_64-20140321/sdk
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH
# Add environment variable ANT_ROOT for cocos2d-x
export ANT_ROOT=/Users/jtsm/Chukong-Inc/AndroidDev/apache-ant-1.9.3/bin
export PATH=$ANT_ROOT:$PATH
Download the Android NDK here: https://developer.android.com/tools/sdk/ndk/index.html
Install it into somefolder folder
Edit your ~/.bash_profile to point to that folder. Example:
export NDKROOT="/Users/you/NVPACK/android-ndk-r9b"

Package Adobe Air to Exe

Using Flash Builder 4.6, I exported an Adobe Air file from my mobile project.
I'm trying to get it packaged into an EXE (that would include the Adobe Air Runtime)
The project was compiled with Air 3.1. I looked online and there are some ADT commands that people recommend using but the problem is that the command throws errors in Air 3.1
If i use air 3.0 ADT:
AIR file at [app path]/app.air could not be converted.
The error was ""
If I use air 3.1 or air 3.2 sdk
SDK is missing file [my path to air]\lib\nai\bin\naip.exe
I'm running
java -jar [path to air]\lib\adt.jar" -package -target native app.dmg app.air
I've also tried
java -jar [path to air]\lib\adt.jar" -package -target native app.exe app.air
I've also looked into projects like this one: http://bishoponvsto.wordpress.com/2010/02/23/adobe-air-2beta-2-to-exe-packaging-air-app-in-windows-executable/ , but it is for Air 2.0.
Any ideas? Apparently there is an integrated Flash Builder 4.6 tool, but for some reason the option under export release doesn't exist for mobile projects - strange...
Why do you want to do this? Air files -- when exported for a specific platform -- are executables.
If you are looking for an "installer" that will create directories, run the Air installation, and move auxiliary files to specific locations (docs, icons, etc.), then try Inno Setup.
EDIT:
The code you provided works for me to create a Windows EXE. But it seems a bit unecessary . . . why not just export the EXE file from Flash Builder ("Export Release Build" button in the top toolbar)? If you can't or won't, then here are some suggestions:
I am using Java version 1.6.0_29. Make sure your Java is not only up to date, but that you are actually calling the correct version (java -version).
Check the JAR directory text carefully .
Check that you are actually calling to the right Air version.
Make sure that the quotation marks are on both sides of the JAR path.
You should be able to do a "Export Release Build" (though I am using FB 4.5). Instead of selecting "Export as: Signed packages for each target platform", select "Export as: Signed AIR packages for installation on the desktop". (You may have to create a certificate, but you can create one through this export feature, too.)
(If you happen to be able to use the Flash IDE, the exported Air file has to support both "Desktop" and "Extended Desktop".)
Hopefully, this will allow you to both produce an Air program that can be converted to EXE, and actually convert it using the command line.
I know this question is a little old, but a co-worker just ran into the same error message using the command line tools and FlashDevelop. It turns out that he was accidentally packaging some source files into the .air package, an extra copy of the app descriptor and one of the swc's was getting packaged in the .air file. I removed those and repackaged the .air file, then used this command:
adt.bat -package -target bundle kiosk kiosk.air
This successfully created a captive runtime exe. Of course there's no need to create a .air file first, you can package right to native or captive runtime, but since my co-worker was creating .air files I did it that way too just to be sure it would work.