Error Compiling cocos2d-x 3.14.1 for Android Studio : Android NDK: jni/Android.mk: Cannot find module with tag ‘cocos’ in import path - cocos2d-x

I'm trying to run cpp-test example project, which is packed in the cocos2d-x 3.14.1 download, on Android Studio. I'm following this tutorial : http://www.cocos2d-x.org/docs/installation/Android-Studio/, which requires complete this first: http://www.cocos2d-x.org/docs/installation/Android-terminal/index.html.
However, I got error when run
python android-build.py -p 22 cpp-tests:
I got this log from cmd :
Android NDK: WARNING: APP_PLATFORM android-22 is larger than android:minSdkVersi
on 9 in ./AndroidManifest.xml
Android NDK: WARNING: Ignoring unknown import directory: D:\cocos2d-x-3.14.1
Android NDK: jni/Android.mk: Cannot find module with tag 'cocos' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `D:/cocos2d-x-3.14.1/tests/cpp-tests/proj.android'
jni/Android.mk:170: *** Android NDK: Aborting. . Stop.
make: Leaving directory `D:/cocos2d-x-3.14.1/tests/cpp-tests/proj.android'
Error running command, return code: 2.
Build dynamic library for project [ D:\cocos2d-x-3.14.1\build\..\tests\cpp-tests
] failed!
I tried another way to compile the project for Android Studio following Sonar Systems's tutorial here: https://www.youtube.com/watch?v=gdOkbXYsf04 . And I got the same error.
Android NDK: WARNING: Ignoring unknown import directory: D:\cocos2d-x-3.14.1
Android NDK: jni/Android.mk: Cannot find module with tag 'cocos' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `D:/cocos2d-x-3.14.1/tests/cpp-tests/proj.android-studi
o/app'
jni/Android.mk:170: *** Android NDK: Aborting. . Stop.
make: Leaving directory `D:/cocos2d-x-3.14.1/tests/cpp-tests/proj.android-studio
/app'
Error running command, return code: 2.
A part of the Android.mk file of the example project:
../../../Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp \
../../../Classes/controller.cpp \
../../../Classes/testBasic.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes \
$(LOCAL_PATH)/../../../../..
LOCAL_STATIC_LIBRARIES := cocos2dx_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,cocos)
I'm using:
Windows 7
Android Studio 2.2.3.
Cocos2d-x 3.14.1
Python 2.7.13
Ant 1.10.1
NDK r13b
Any solution for this please?

Hmm, it seems you are not reading the errors
First:
Android NDK: WARNING: Ignoring unknown import directory:
D:\cocos2d-x-3.14.1
Android NDK: jni/Android.mk: Cannot find module with tag 'cocos' in
import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly
defined ?
Android NDK: The following directories were searched: Android NDK:
You must setup cocos properly - run setup.py , and make sure your Android NDK path is pointing to the right directory. Likewise make sure ANT and Python are in the right directories.
Second:
Android NDK: WARNING: APP_PLATFORM android-22 is larger than
android:minSdkVersi on 9 in ./AndroidManifest.xml
Either change the platform, or the minimum sdk...
If you do not even read the errors, how can you possibly solve your problem.... Bye! :D

Related

Unable to install couchbase in python on macOs

I am trying to install couchbase on my macOS. I am using pip3 install couchbase to install it.
And I am getting error as
`note: '__uint128_t' declared here
/Library/Developer/C
ommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
note: '__uint128_t' declared here
In file included from src/bucket.c:18:
In file included from src/pycbc.h:45:
In file included from src/python_wrappers.h:20:
In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from src/bucket.c:18:
In file included from src/pycbc.h:45:
In file included from src/python_wrappers.h:20:
In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
/private/tmp/pip-install-46t38raq/couchbase_25d29b67ce814e2badeb9f2deaba5d2c/cbuild_config.py:271: UserWarning: Adding /usr/local to lib search path for OS X
warnings.warn('Adding /usr/local to lib search path for OS X')
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for couchbase Failed to build couchbase
ERROR: Could not build wheels for couchbase which use PEP 517 and cannot be installed directly
I also tried pip3 install --no-use-pep517 couchbase then also I am getting could not build a wheel for couchbase
I have upgraded my pip to the latest. I have python3.8. I also installed pep517.

openCV doesn't play video on Fedora 28

I have just started learn opencv and i encountered a problem about playing video. I use qt-creator for opencv and my os is fedora 28.
My code:
cv::VideoCapture vCap;
vCap.open("/home/enes/sample.mp4");
if(vCap.isOpened()){
cv::Mat frame;
cv::namedWindow("Video");
for(;;){
if(!vCap.read(frame)) break;
cv::imshow("Video", frame);
}
}
My problem is below.
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device /home/enes/sample.mp4: Unable to query number of channels
OpenCV(3.4.1) Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp, line 1869
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
OpenCV(3.4.1) /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:1869: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
in function handlemessage
CvCapture_OpenNI::CvCapture_OpenNI : Failed to open input file (/home/enes/sample.mp4): Bad file extension
What should I do to solve this problem? Thanks.
I managed to play MP4 video with OpenCV on Fedora 28 by building the opencv module from source, as described here: Install OpenCV-Python in Fedora.
I also installed most of the gstreamer-plugins-* packages and uninstalled the managed OpenCV packages before compiling Open CV.

Error when building for IOS

I am having the following error when building for ios
ld: file too small (length=0) file '/Users/………./.robovm/cache/ios/x86/default/Users/ ……/.m2/repository/org/robovm/robovm-dist/0.0.13/unpacked/robovm-0.0.13/lib/robovm- rt.jar/java/nio/PipeImpl$PipeSinkChannel.class.o' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
:ios:launchIPhoneSimulator FAILED
FAILURE: Build failed with an exception.
Any ideas? The desktop configuration is working. The JDK is 1.7+
I have installed the latest gradle setup for libgdx
Thanks
See for solution here: https://github.com/robovm/robovm/issues/238
You need to remove zero-length class from cache and run build again.

Cocos2d-x build error windows eclipse

I am developing an android 2d game using cocos2d-x. I have imported a sample project in eclipse but when i tried to build it, it gives me an error:
Build of configuration Default for project HelloCpp **
bash E:/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android/build_native.sh -k
E:/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android/build_native.sh: illegal option -- k
NDK_ROOT = E:\zAndroid\android-ndk-r9b
COCOS2DX_ROOT = /e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android/../../../..
APP_ROOT = /e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android/..
APP_ANDROID_ROOT = /e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android
Using prebuilt externals
+ 'E:\zAndroid\android-ndk-r9b/ndk-build' -C /e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android -k NDK_MODULE_PATH=/e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android/../../../..:/e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt
make: Entering directory '/cygdrive/e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android'
"C:/program files/git/bin/rm.exe": cannot unlink `NUL': Invalid argument
Android NDK: WARNING: Ignoring unknown import directory: e
Android NDK: WARNING: Ignoring unknown import directory: \zAndroid\cocos2d-x-2.2;e
Android NDK: WARNING: Ignoring unknown import directory: \zAndroid\cocos2d-x-2.2\cocos2dx\platform\third_party\android\prebuilt
e:/zAndroid/android-ndk-r9b/build/core/prebuilt-library.mk:68: * target pattern contains no '%'. Stop.
make: Leaving directory '/cygdrive/e/zAndroid/cocos2d-x-2.2/samples/Cpp/HelloCpp/proj.android'
Build Finished **
Computer --> properties --> Advanced system settings --> Environment Variables.. --> Path( in System variables ) you need remove "C:/program files/git/bin"
Good luck.

Error while building project with ExportSWC plugin in FlashDevelop

I am making a ActionScript library which is a Flex 4 project for my Adobe AIR Native Extension in FlashDevelop. When I build the project its successful, but when I try to build the project with ExportSWC plugin to get .swc file I get the following message:
Prebuilding config C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml...
Configuration writen to: C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml
Running Process:
"C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\compc.exe" -load-config+="C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml"
Error loading: C:\Program Files\Java\jdk1.7.0_25\jre\bin\server\jvm.dll
Building AsDoc
AsDoc temp output: C:\Users\Osama Mohammed\AppData\Local\Temp\7827039c-c329-4b6d-acb7-447146a5f4fe
Start AsDoc: C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\asdoc.exe
-lenient=true -keep-xml=true -skip-xsl=true -output "C:\Users\Osama Mohammed\AppData\Local\Temp\7827039c-c329-4b6d-acb7-447146a5f4fe" -source-path "c:\users\osama mohammed\documents\androidsipmanager\src" -doc-classes com.innovative.androidsipmanager.AndroidSIPManager com.innovative.androidsipmanager.Main -exclude-dependencies=true -target-player=10.1
Following is the error:
Error loading: C:\Program Files\Java\jdk1.7.0_25\jre\bin\server\jvm.dll
AsDoc complete (6)
Build failed (6).
Please help me in solving this error.
I had to remove Java 64 bit & install Java 32 bit. Now it is working.