android-ndk

Type 'jint' could not be resolved, and JNIEnv, jclass

て烟熏妆下的殇ゞ 提交于 2019-12-31 10:36:49
问题 Trying to build a simple helloWorld android/java application with jni c code. I am using Eclipse Indigo on Windows 7. Installed ndk r8 in a non-space path, have the c library finally building fine with ndk-build.cmd. However, the header file generated by javah has unresolved errors, Type 'jint' could not be resolved Type 'JNIEnv' could not be resolved Type 'jclass' could not be resolved It wasn't seeing the jni.h include yesterday but after a reboot this morning, that error has disappeared. I

Decoding audio via Android using FFMpeg

。_饼干妹妹 提交于 2019-12-31 09:06:30
问题 I can play Wav files using the below code without issues. When trying to play the exact same media in Mp3 format I only get garbled junk. I believe I am fundamentally misunderstanding how the avcodec_decode_audio3 function works. Since the Wav file contains PCM data when it is decoded it can go straight to the AudioTrack.write function. There must be some additional step to get Mp3s to work like this. I don't know what I'm missing, but I've been pulling my hair out for a week now. Java Code

Difference between SDK and NDK in android

一曲冷凌霜 提交于 2019-12-31 07:34:24
问题 Since 2 Years I am working as Android Application Developer. I generally use android SDK for all the Android Apps Development. Now I have a project which is an Android App in which I have to use SDK as well as NDK for App development (As per Client requirement). But as I don't have any experience with NDK I don't know what is it. In some Blogs I have read that NDK development is based on c++. Is it true that to work with NDK one must have the complete knowledge of c++ ? Please Help !! 回答1:

Android and libCurl https

岁酱吖の 提交于 2019-12-31 04:24:05
问题 Good evening, I need to implement libCurl into one of our Android projects. I use JNI to call the c++ class with the libCurl code. Everything works just perfect but for the love of god I can't get it to work using a https url. I always get the CURLE_UNSUPPORTED_PROTOCOL error. I'm using this prebuild curl library with SSL My c++ code looks like this: curl_easy_setopt(curl, CURLOPT_URL, "https://www.es...."); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl,

Cocos2dx Android build error: “arm-linux-androideabi-g++: No such file or directory”

早过忘川 提交于 2019-12-31 04:09:09
问题 I downloaded the latest cocos2dx(3.10) and NDK(r11). I have the following error when I executed cocos compile -p android --android-studio . Error: ~/AndroidDev/android-ndk-r11/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory Then I found in NDK Revision History here for r11 the following: Removed GCC 4.8. All targets now use GCC 4.9. Are there workarounds to switch cocos2dx settings to 4.9? 回答1: In your NDK directory create

libutils for android ndk

限于喜欢 提交于 2019-12-31 03:26:10
问题 I need to use some classes (Vector, string8) provided in the libUtils.so , but this library did not come with the ndk_linux_x86_r4 . In addition, I am having some problems to build this library from the source code. Does anyone have this library built or know where to download it? 回答1: Build the Android source tree and the binary will appear in out/target/product/generic/obj/SHARED_LIBRARIES/libutils_intermediates/LINKED . 来源: https://stackoverflow.com/questions/4365184/libutils-for-android

telegram not compile with ndk 18

允我心安 提交于 2019-12-31 03:06:43
问题 When i try compile telegram with android studio 3.2, i get an error: Android NDK: Invalid NDK_TOOLCHAIN_VERSION value: 4.9. GCC is no longer supported. I know, what from version of android ndk 18 and more gcc is no longer supported, but how i can fix this error in telegram, or it's better wait new version of telegram on github? When i tryed delete string in application.nk file,connected with version of toolch, i got another errors, connected with cpp files. Help me please compile telegram

Android JNI: 32-bit compatability with 64-bit devices?

喜你入骨 提交于 2019-12-30 12:15:41
问题 I have some libraries that use native components, the libraries are built with NDK for 32 bit Arm architectures. now we have 64-bit processors on modern devices, so I'm wondering if the libraries will work. In my situation, I don't have the source code files of the native library, just the SO files, I can't build them for 64-bits. So will the 32-bits libraries run on 64-bits processors? or I have to re-build them? ** EDIT ** In my scenario I have the following: 1- I distribute the APK

Android Unsatisfied Link using gradle experimental v0.6.0-beta6

南笙酒味 提交于 2019-12-30 11:35:35
问题 I was trying to create a simple project to test the NDK in which a jnilib uses a prebuilt .so library but I keep getting an UnsatisfiedLink error: With emulator: java.lang.UnsatisfiedLinkError: dlopen failed: library "~/AndroidStudioProjects/HelloAndroidJni/app/src/main/jni/libs/dynamic/x86/libadd.so" not found With actual device: Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]: 1675 could not load needed library '~/AndroidStudioProjects/HelloAndroidJni/app

How to decrease the size of android native shared libaries (.so files)?

白昼怎懂夜的黑 提交于 2019-12-30 11:03:47
问题 I am trying to build opencv (version 3.4.2) for Android using ndk-18-beta1 and c++_static since this ndk does not support gnustl_static anymore. I created my ndk-config.py file with just armeabi-v7a architecture: ABIs = [ ABI("2", "armeabi-v7a", "arm-linux-androideabi-clang3.5", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_STL="c++_static")), ] to use c++_static and clang toolchain. And build it just with: ../opencv-3.4.2/platforms/android/build_sdk.py --ndk_path [path_to_ndk