我正在使用vitamio播放视频和音频,因为我使用了gradle configure,如下所示
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
它完美地适用于所有Android版本。
现在我使用CMaker tutorial添加了JNI代码进行某些操作但是应用程序在Android版本7上只在低于日志的情况下崩溃
Build fingerprint: 'xiaomi/mido/mido:7.0/NRD90M/V8.5.4.0.NCFMIED:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 27944, tid: 28106, name: SyncAdapterThre >>> com.mypackage <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x29c
r0 e4685300 r1 00000000 r2 074edc1e r3 000004a1
r4 00000000 r5 0000001a r6 cf6b6740 r7 c63fecf0
r8 c63feca8 r9 00000020 sl c63fecc8 fp 4ec4ec4f
ip 2280b031 sp c63feca8 lr ec409776 pc cf6b6712 cpsr 60010030
更改NDK配置后如下工作
ndk {
abiFilters "arm64-v8a","armeabi", "armeabi-v7a", "x86","x86_64", "mips"
}
但是现在只有使用以下日志
才能在android版本7上发生vitamio崩溃Build fingerprint: 'xiaomi/mido/mido:7.0/NRD90M/V8.5.4.0.NCFMIED:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 30859, tid: 30859, name: .onlineradioapp >>> com.mypackage <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
x0 00000000000017a8 x1 0000000000000000 x2 0000007f6c200000 x3 0000000000000002
x4 00000000000001a1 x5 0000000000008080 x6 0000007fa5c62000 x7 0000000000000000
x8 0000000000000000 x9 0000007fa1e0c688 x10 00000000000001a1 x11 0000000000000000
x12 0000000000000018 x13 0000000000000000 x14 0000000000000000 x15 00326d4469b4dcca
x16 0000007fa26625a0 x17 0000007fa26098a8 x18 00000000ffffffff x19 0000007fe80b04e0
x20 0000007f798baa90 x21 0000007f6c3a1480 x22 0000007f798da000 x23 0000007f798da000
x24 0000007f798ba000 x25 0000000000000000 x26 0000000000200021 x27 56c8e96642a3fb3d
x28 0000000000000001 x29 0000007fe80b0480 x30 0000007f798b344c
sp 0000007fe80b0480 pc 0000000000000000 pstate 0000000020000000
ABI存在问题,没有任何可用于ABI: 'arm64'
的实施可以帮助我解决此问题
谢谢
答案 0 :(得分:0)
你好-jni.c
Java_com_example_hellojni_HelloJni_stringFromJNI(JNIEnv *env,jobject thiz)
HelloJni.java
package com.example.hellojni;
static {
System.loadLibrary("hello-jni");
}
public native String stringFromJNI();
我理解包装的原因不一样