Set NDK_MODULE_PATH for cocos2d-x - 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"

Related

Can not do "import chisel3._"

I want to use chisel3.2, and have installed "sbt" into Mac OS-X.
I wrote my project (Scala file), and downloaded template of project.
I did;
sbt
It did a lint of "scala" but did not import chisel3 object.
Indeed this is caused by PATH setting, but there is no information about it.
Does anyone suggest a solution?

configure cordova-plugin into capacitor environment

I have a react-app webapp wrapped by an ionic-capacitor framework.
I already used a lot of cordova-plugins inside my code, like the phonegap-plugin-barcodescanner or the cordova-plugin-inappbrowser.
I understood that i can use them if I make:
npm install --save cordova-plugin-pluginName #ionic-native/plugin-name
then i could import them into my React environment with:
import {PluginName} from #ionic-native/plugin-name
and it's works like a magic!
The problem is:
when i need to use a cordova-plugin which requires configuration, it used to be cordova add plugin plugin-name --variable var=""
but in the react-capacitor environment i can't install the plugin with it's configuration! i should add it later somehow, via the androidManifest.xml or via the cordova:config.xml.
can someone help me please?
thanks a lot...
Ionic provides a tool for changing the ios/android configs using a separate file. It's called Trapeze. It does require a bit of extra configuration and an aditional build step but it will allow for the adding of these variables to the ios/android config.

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.

Build dynamic library for project fails! - android cocos

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.

How to install cocos2d-x in windows8 and VS2013

I want to install cocos2d-x on my windows8 but i download this "http://bit.ly/18xmkJ9" from "http://cocos2d-x.org/download" in the tutorial says that i must execute a .bat in there or in some other pages says that i neet to create a project in VS, but when i try to do what they say in the tutorial i dont see anithing that is shown.
I'm very lost and help needed.
Could anybody say me hoy to createand start a project on cocos2d?
I have answer the similar question here.
Before cocos2d-x 2.1.2, you can still use templates in VS. However, you can only use python to create project
Install python 2.7
Open command line in Windows
Go to your cocos2d-x-2.1.5\tools\project-creator folder
Run create_project.py. Usage:
create_project.py -project YourProjectName -package com.example.PakcageName -language cpp
-language option:[cpp | lua | javascript]
Your project will be created in cocos2d-x-2.1.5\projects
Then find the win32.proj , open ***.sln