android-ndk

Solution for missing std::wstring support in Android NDK?

人走茶凉 提交于 2019-12-30 09:30:17
问题 I have a game which uses std::wstring as its basic string type in thousand of places as well as doing operations with wchar_t and its functions: wcsicmp() wcslen() vsprintf(), etc. The problem is wstring is not supported in R5c (latest ndk at the time of this writting). I can't change the code to use std::string because of internationalization and I would be breaking the game engine which is used by many games ... Which options do I have? 1 - Replace string and wstring with my own string

Android.mk - build all source file in a directory

血红的双手。 提交于 2019-12-30 04:34:08
问题 I am using Android NDK to build my cocos2dx project, within the Android.mk, there is a definition for LOCAL_SRC_FILES where each of the cpp file are listed. Whenever I added a new source file, I'd need to add it there as well... it looks like this: LOCAL_SRC_FILES := hellocpp/main.cpp \ hellocpp/myclass.cpp \ hellocpp/mynextclass.cpp \ ../../Classes/Screens/LaunchScreen.cpp \ the header file, however, can specify the entire directory to include, it looks like this: LOCAL_C_INCLUDES := $(LOCAL

Android.mk - build all source file in a directory

て烟熏妆下的殇ゞ 提交于 2019-12-30 04:34:06
问题 I am using Android NDK to build my cocos2dx project, within the Android.mk, there is a definition for LOCAL_SRC_FILES where each of the cpp file are listed. Whenever I added a new source file, I'd need to add it there as well... it looks like this: LOCAL_SRC_FILES := hellocpp/main.cpp \ hellocpp/myclass.cpp \ hellocpp/mynextclass.cpp \ ../../Classes/Screens/LaunchScreen.cpp \ the header file, however, can specify the entire directory to include, it looks like this: LOCAL_C_INCLUDES := $(LOCAL

NDK API reference docs? [closed]

牧云@^-^@ 提交于 2019-12-30 03:56:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm looking for reference documentation for the NDK libraries, anyone know where to find them? not java APIs. I can't find any in the NDK directory or online. 回答1: Yes the API documentation of the NDK is very sparse. Most of the docmentation is in the docs folder of the NDK itself. Also the examples are helpful.

Can the android NDK compile kernel module source?

北城以北 提交于 2019-12-30 03:36:05
问题 I want make a dynamic loaded kernel module for android. I don't want to install a linux, I just have cygwin and android NDK. 回答1: Just now I found this URL where the user has attempted loading LKM and was successful, though on Android (Kernel core: 2.6.29) and I think it was on Linux and not on Cygwin. Hope you get it too! There is one more resource here and here too!. All the best! 回答2: Yes, it is possible to build kernel modules with the NDK. Note, this works best with a Linux system (I'm

Shell script call from Android.mk, standard output and missing separator error

前提是你 提交于 2019-12-30 03:14:30
问题 I have a simple Android.mk file: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) $(shell ($(LOCAL_PATH)/echo_test.sh)) LOCAL_MODULE := libecho_test LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) The interesting thing that it does is to call the 'echo_test.sh' bash script. In the case when the contents of the script are #!/bin/bash echo 'echo is working' >&2 or #!/bin/bash echo 'echo is working' >/dev/null everything is OK. Things go wrong when the bash script is #!/bin/bash

How to target multiple architectures using NDK?

三世轮回 提交于 2019-12-30 01:37:11
问题 Background I've recently started to develop some code using the NDK, and I've thought of a possible portability problem that could occur while developing using NDK. The problem Since NDK uses native code, it needs to be compiled per CPU architecture. This is a problem since the user needs to run the app no matter what CPU the device has. Possible solutions I've found so far I've noticed I can modify the file "jni/Application.mk" and use: APP_ABI := armeabi armeabi-v7a x86 however, I don't

How do we identify libraries build with NDK is 64-bit supported?

岁酱吖の 提交于 2019-12-29 09:22:28
问题 Google saying that apps using native code / libraries must provide a 64-bit version in addition to the 32-bit version by August 1, 2019 . It's easy to identify the app developed in NDK from it's code. But how do we identify a library which is developed in NDK? 回答1: According to Does your app use native code?, For the ARM architecture, the 32-bit libraries are located in armeabi-v7a . The 64-bit equivalent is arm64-v8a . For the x86 architecture, look for x86 for 32-bit and x86_64 for 64-bit.

No implementation found for native [closed]

*爱你&永不变心* 提交于 2019-12-29 08:42:55
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I compiled my c sources with android-ndk then I put the .so file in the libs folder of my android project but when I call the native function i have a "No implementation found for native" error. If I try to call

Packaging linux binary in Android apk

ぃ、小莉子 提交于 2019-12-29 08:07:41
问题 If I want to include a linux binary (like ffmpeg) in my .apk file (only for ARM based devices), is this possible to distribute for non rooted phones? I know it's possible to call an included binary with Runtime.exec() but is it a recommended practice? 回答1: You can store the binary in res/raw or in assets folder. This way it will be deployed on the device. You should "extract" it after the installation, your /data/data/your.package/files/ is a valid destination; /sdcard/ is not. The usual