java-native-interface

%1 is not a valid Win32 application

て烟熏妆下的殇ゞ 提交于 2021-02-11 08:21:54
问题 I want to make a .dll in Qt, and to use generated .dll in a Java project in Eclipse. I've followed this tutorial to create a working dll. The full code that works is given below: jniProjectExample_JniExample.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class jniProjectExample_JniExample */ #ifndef _Included_jniProjectExample_JniExample #define _Included_jniProjectExample_JniExample #ifdef __cplusplus extern "C" { #endif /* * Class: jniProjectExample

Failed to cross-compile library from Windows to Android

◇◆丶佛笑我妖孽 提交于 2021-02-11 07:13:13
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Failed to cross-compile library from Windows to Android

别等时光非礼了梦想. 提交于 2021-02-11 07:10:51
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Failed to cross-compile library from Windows to Android

爷,独闯天下 提交于 2021-02-11 07:09:22
问题 I'm trying to cross-compile a Rust library to 4 Android targets (i386, x86_64, armv7, and aarch64) from Windows. I have set up Android NDK toolchain for these targets and tried to compile my library with help of this tutorial. I think I've set up the toolchain correctly, and I'm able to successfully execute aarch64-linux-android-clang in the terminal. Build log: cargo build --target aarch64-linux-android --release --verbose Fresh cc v1.0.28 Fresh autocfg v0.1.1 Fresh version_check v0.1.5

Missing step to create a new AS project and get a lib folder populated on my device upon installation

ⅰ亾dé卋堺 提交于 2021-02-10 18:22:23
问题 Goal I want the libs present in my APK to be available on my device from a fixed location when I install my APK. I opened another question about this issue based on my existing project. This time, I started a brand new project from scratch in order to reduce the unknowns and make my question simpler to resolve. Steps I followed With Android Studio 4.0.1, I do the following: Start a new Android Studio project Select Native C++ Set project name to test Select Java as language Use default

Missing step to create a new AS project and get a lib folder populated on my device upon installation

佐手、 提交于 2021-02-10 18:20:44
问题 Goal I want the libs present in my APK to be available on my device from a fixed location when I install my APK. I opened another question about this issue based on my existing project. This time, I started a brand new project from scratch in order to reduce the unknowns and make my question simpler to resolve. Steps I followed With Android Studio 4.0.1, I do the following: Start a new Android Studio project Select Native C++ Set project name to test Select Java as language Use default

JNI/C socket connection error on Solaris 11

主宰稳场 提交于 2021-02-10 18:00:24
问题 Our application uses several socket connections (to localhost) implemented in c, with one connection using a jni/c socket connection. All of them call the same include to open the socket, and all are successful when we run the application on Solaris 10. Migrating to Solaris 11, we are finding that only the socket connections built in c are working, the one jni/c connection will not. I've added output to see what exactly is being sent to the connect call and it looks like the call is getting

Android native library (.so) - unsatisfied link error

别来无恙 提交于 2021-02-10 14:33:56
问题 I have recently created and published an Android App bundle with compiled native libraries for all processors architectures. On most of devices everything is running ok. But on some of devices I can see this error in Crashlytics console Fatal Exception: java.lang.UnsatisfiedLinkError dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.someapp-wAu5DoLmLvM_RVnbU1qsCg==/base.apk"],nativeLibraryDirectories=[/data/app/com

What can cause jni references memory problems? A few detailed questions

痴心易碎 提交于 2021-02-10 14:20:06
问题 I have recently started working on an Android project with native calls via JNI. I've learnt about pretty restrictive limitations regarding number of references a native call can create. I would like to understand deeply how this reference management works. I studied some information but I still have a few questions that I would like to know the answers to. Without further ado: Which kinds of references in native code can cause those memory limits to be exceeded? Which count towards limits

What can cause jni references memory problems? A few detailed questions

て烟熏妆下的殇ゞ 提交于 2021-02-10 14:15:53
问题 I have recently started working on an Android project with native calls via JNI. I've learnt about pretty restrictive limitations regarding number of references a native call can create. I would like to understand deeply how this reference management works. I studied some information but I still have a few questions that I would like to know the answers to. Without further ado: Which kinds of references in native code can cause those memory limits to be exceeded? Which count towards limits