'register_android_system_OsConstants(_JNIEnv*)'解决方案
来源:互联网 发布:mysql停用索引 编辑:程序博客网 时间:2024/06/01 09:16
编译5.1的时候遇到'register_android_system_OsConstants(_JNIEnv*)',发现是jni.h文件找不到,这个文件并不在Android源码而是在jdk里的include文件夹下。
最简单的方法将include的加到环境变量里:JAVA_HOME/include
log如下:
host SharedLib: libjavacore_32 (out/host/linux-x86/obj32/lib/libjavacore.so)
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libjavacore_intermediates/luni/src/main/native/android_system_OsConstants.o: file is emptylibcore/luni/src/main/native/Register.cpp:36: error: undefined reference to 'register_android_system_OsConstants(_JNIEnv*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [out/host/linux-x86/obj32/lib/libjavacore.so] Error 1
0 0
- 'register_android_system_OsConstants(_JNIEnv*)'解决方案
- 编译android5.1 源码 遇到错误undefined reference to 'register_android_system_OsConstants(_JNIEnv*)'
- (Android jni) error: base operand of '->' has non-pointer type '_JNIEnv'
- 安卓JNI编程-- :error: base operand of '->' has non-pointer type '_JNIEnv' 解决办法
- base operand of '->' has non-pointer type 'JNIEnv {aka _JNIEnv}'和Method 'GetStringUTFChars' could no
- base operand of '->' has non-pointer type 'JNIEnv {aka _JNIEnv}'和Method 'GetStringUTFChars' could no
- JNI错误之:error: base operand of '->' has non-pointer type '_JNIEnv'
- Android之jni编译出现no matching function for call to '_JNIEnv::GetJava(JNIEnv* &, Java VM**)'解决办法)'
- 解决方案
- 解决方案
- 解决方案
- 解决方案
- 解决方案
- 电力巡检解决方案解决方案
- 构造解决方案
- 管理解决方案
- brew解决方案
- IPTV解决方案
- OC中的类方法与成员方法
- android service绑定
- 新的旅程 出发!
- B. Amr and The Large Array(Codeforces Round #312 (Div. 2)+找出现次数最多且区间最小)
- MonkeyTalk Java API 使用教程
- 'register_android_system_OsConstants(_JNIEnv*)'解决方案
- leetcode_Maximum Product Subarray
- 面试题6
- 本田CRV被曝轮胎速度级别等同3万元小面包车
- 怎样为孩子30年后做打算。
- codevs1295 N皇后问题 解题报告
- spring4.0整合mongodb3.0.4项目实践(用户验证)
- C. Amr and Chemistry(Codeforces Round #312 (Div. 2) 二进制+暴力)
- 生活