I have an app using old so library compiled only for armeabi, But I have to write some new native code in C file NativeCode.c and compile it with app.
Old library is running correctly only when I set in the build.gradle
ndk {
moduleName "NativeCode"
abiFilters "armeabi"
}
But when I run app on arm64-v8a phone always get an error:
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.app.module, PID: 4199
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.app.module-2/base.apk"],nativeLibraryDirectories=[/data/app/com.app.module-2/lib/arm64, /data/app/com.app.module-2/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libnativecode.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.app.module.util.NativeCode.<clinit>(NativeCode.java:25)
Is there any way to tell android studio to build native code only for armeabi ?
Related
When testing my android app agaisnt a few different phones i've ran into the following error:
Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/base.apk"],nativeLibraryDirectories= [/lib/arm, /system/lib, /product/lib]]] couldn't find "libruntime.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1667)
Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "base.apk"],nativeLibraryDirectories= [/lib/arm64, /system/lib64, /hw_product/lib64, /system/product/lib64]]] couldn't find "libruntime.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1668)
After reading a similar post about this:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader
And looking at the android docs on ABIs:
https://developer.android.com/ndk/guides/abis#gradle
I'm a little confused by what the resolution would be in my case, the examples listed include by android contains:
/lib/armeabi/libfoo.so
/lib/armeabi-v7a/libfoo.so
/lib/arm64-v8a/libfoo.so
/lib/x86/libfoo.so
/lib/x86_64/libfoo.so
However from the stack traces I seem to be looking for:
/lib/arm
/lib/arm64
Would I need to add support for a deprecated ABI not mentioned for these cases?
I am using Unity in combination with a custom NDK-Library, inside my app.
My problem is that if I try to start the Activity hosting Unity, the process always crashes with the message:
E/Unity: Unable to find main
and a alertBox from Unity:
Title:Failure to initialize!
Message: Your hardware doesn't support this Application
After some trying arround, I got the solution that I have to add the following into my gradle File:
android{
...
defaultConfig{
...
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
}
...
}
after doing this Unity runs without Errors, but when I start an Activity housing my own NDK-Library it crashes with the Error.
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/de.biosign.daimlerhrv-2/base.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_dependencies_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_0_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_1_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_2_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_3_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_4_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_5_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_6_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_7_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_8_apk.apk", zip file "/data/app/de.biosign.daimlerhrv-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/de.biosign.daimlerhrv-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]] couldn't find "libMyLib.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:972)
at java.lang.System.loadLibrary(System.java:1530)
at de.biosign.sessioncomponents.session.RunningSession.<clinit>(RunningSession.java:34)
at de.biosign.mvc.session.sessionController.SessionController.<init>(SessionController.java:63)
at de.biosign.biofeedbackunity.BiofeedbackUnity.onCreate(BiofeedbackUnity.java:109)
at android.app.Activity.performCreate(Activity.java:6666)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6251)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Has anyone got a solution for this problem and can give me a Hint.
Thanks
According to your error logs
Caused by: java.lang.UnsatisfiedLinkError: ...... /system/lib64, /vendor/lib64, /system/vendor/lib64
It looks your device is 64-bit. But your abiFilters 'armeabi-v7a', 'x86' is only for 32-bit.
So, the possible solution to your problems may be as below adding 64-bit ABIs into the abiFilters:
abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'
Cross check:
Android NDK - Using libraries compiled with a different API level
How do we identify libraries build with NDK is 64-bit supported?
The solution for me was to add the following to my Android.mk:
(See also at https://developer.android.com/ndk/guides/android_mk)
TARGET_ARCH : armeabi-v7a x86
so my libs became, generated for this architecture, it runs again beside Unity,
According to some posts newer Versions of above 2017.4 Unity already support 64 bits, but for my work am using 5.6, so can use this.
For others using 2017.4 or above there is the link:
https://developer.android.com/distribute/best-practices/develop/64-bit#unity_developers
I am using react native 0.41 and my app crashes with the exception provided below. I unzipped the react native aar but did not found libjsc.so under jni/ folder. How can I provide the libjsc.so?
12-22 17:31:44.103 2273-2273/com.example.sampleapp.photos E/art: dlopen("/data/app/com.example.sampleapp.photos-1/lib/x86/libreactnativejni.so", RTLD_LAZY) failed: dlopen failed: library "libjsc.so" not found
12-22 17:31:44.181 2009-2657/com.google.android.gms E/MDM: [171] wvj.run: Couldn't connect to Google API client: ksj{statusCode=API_UNAVAILABLE, resolution=null, message=null}
12-22 17:31:44.214 2273-2273/com.example.sampleapp.photos E/AndroidRuntime:
FATAL EXCEPTION: main
Process: com.example.sampleapp.photos, PID: 2273
java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
at java.lang.Runtime.load(Runtime.java:331)
at java.lang.System.load(System.java:981)
at com.facebook.soloader.SoLoader$1.load(SoLoader.java:279)
at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:69)
at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:40)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:427)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:367)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:332)
at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:24)
at com.facebook.react.bridge.ReactBridge.<clinit>(ReactBridge.java:20)
at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:24)
at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:22)
at com.facebook.react.JSCConfig$1.getConfigMap(JSCConfig.java:14)
at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundFromBundleLoader(XReactInstanceManagerImpl.java:431)
at com.facebook.react.XReactInstanceManagerImpl.recreateReactContextInBackgroundInner(XReactInstanceManagerImpl.java:426)
at com.facebook.react.XReactInstanceManagerImpl.createReactContextInBackground(XReactInstanceManagerImpl.java:370)
at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:215)
at com.example.reactnative.ReactActivity.runReactComponent(ReactActivity.java:107)
at com.example.reactnative.ReactActivity.createReactComponentView(ReactActivity.java:120)
at com.example.reactnative.ReactActivity.onCreate(ReactActivity.java:49)
Try these things
locating the gradle.properties file in the root project, and add
Android.useDeprecatedNdk=true
and in build.gradle add this
android {
...
defaultConfig {
...
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
I cloned this project and and copied the .so files to my project's jniLibs folder.
After that, it looked like this:
However, when I tried using the library it throws:
09-18 10:22:53.861 18439-19193/com.mopo.audiofingerprinter W/linker: libACRCloudExtrTool.so: unused DT entry: type 0x6ffffffe arg 0x4718
09-18 10:22:53.861 18439-19193/com.mopo.audiofingerprinter W/linker: libACRCloudExtrTool.so: unused DT entry: type 0x6fffffff arg 0x2
09-18 10:22:53.871 18439-19193/com.mopo.audiofingerprinter E/art: No implementation found for void com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init() (tried Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init and Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init__)
09-18 10:22:53.881 18439-19193/com.mopo.audiofingerprinter E/UncaughtException: java.lang.UnsatisfiedLinkError: No implementation found for void com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init() (tried Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init and Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init__)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init(Native Method)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.<clinit>(ACRCloudExtrTool.java:57)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.createFingerprintByFile(ACRCloudExtrTool.java:0)
at com.mopo.audiofingerprinter.tageditor.ACRCloudRecognizer.recognizeByFile(ACRCloudRecognizer.java:129)
at com.mopo.audiofingerprinter.tageditor.TestActivity$RecThread.run(TestActivity.java:84)
09-18 10:22:54.132 18439-19193/com.mopo.audiofingerprinter E/AndroidRuntime: FATAL EXCEPTION: Thread-51298
Process: com.mopo.audiofingerprinter, PID: 18439
java.lang.UnsatisfiedLinkError: No implementation found for void com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init() (tried Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init and Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init__)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init(Native Method)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.<clinit>(ACRCloudExtrTool.java:57)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.createFingerprintByFile(ACRCloudExtrTool.java:0)
at com.mopo.audiofingerprinter.tageditor.ACRCloudRecognizer.recognizeByFile(ACRCloudRecognizer.java:129)
at com.mopo.audiofingerprinter.tageditor.TestActivity$RecThread.run(TestActivity.java:84)
The weird thing, is that the compiled project I cloned is working without errors. I have even attempted copying the classes from the demo and still it didn't work.
EDIT
After implementing Divy Soni's answer, the jniLibs folder disappeared entirely. And when I built the app it crashed with:
`09-18 11:21:46.848 26158-26798/com.mopo.audiofingerprinter E/UncaughtException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mopo.audiofingerprinter-1/base.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.mopo.audiofingerprinter-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libACRCloudExtrTool.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:988)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.<clinit>(ACRCloudExtrTool.java:56)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.createFingerprintByFile(ACRCloudExtrTool.java:0)
at com.mopo.audiofingerprinter.tageditor.ACRCloudRecognizer.recognizeByFile(ACRCloudRecognizer.java:129)
at com.mopo.audiofingerprinter.tageditor.TestActivity$RecThread.run(TestActivity.java:84)`
EDIT2
Please note that the feaures I am using libACRCloudEngine.so is working perfectly. So it's libACRCloudExtrTool.so that is the problem here.
put this line in app build.gradle,it represent the path of .so files.
android {
.
.
sourceSets {
main {
jniLibs.srcDirs = ['jniLibs']
}
}
}
I have two .aar files that I need to add to my project as dependencies. I imported the projects and did the following and it worked just fine.
dependencies {
compile project(':zoomcommonlib')
compile project(':zoomsdk')
}
However, I have added many other libraries and I had to use MultiDex library to support apps over 64K methods
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile project(':zoomcommonlib')
compile project(':zoomsdk')
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
.....
}
Yes, MultiDex is properly setup because I can build the application and run it with no problem.
The problem: When I try to utilize those specific projects, application crashes. Following Log:
18790-18790/com.mypackage.name E/UncaughtException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mypackage.name-1/base.apk", zip file "/data/app/com.mypackage.name-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.mypackage.name-1/lib/arm64, /data/app/com.mypackage.name-1/base.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libzoom_stlport.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:984)
at java.lang.System.loadLibrary(System.java:1530)
at com.zipow.cmmlib.AppContext.<clinit>(AppContext.java:31)
at com.zipow.cmmlib.AppContext.initialize(AppContext.java:64)
at us.zoom.sdk.ZoomSDK.initialize(ZoomSDK.java:225)
at us.zoom.sdk.ZoomSDK.initialize(ZoomSDK.java:184)
at com.mypackage.name.SectionListActivity.getInitializedZoomSDK(SectionListActivity.java:857)
at com.mypackage.name.SectionListActivity.access$1500(SectionListActivity.java:88)
at com.mypackage.name.SectionListActivity$8.onClick(SectionListActivity.java:812)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22429)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
18790-18899/com.mypackage.name D/FA: Logging event (FE): _ae, Bundle[{_o=crash, _sc=SectionListActivity, _si=7450316610930895524, timestamp=1488996958198, fatal=1}]
18790-18899/com.mypackage.name V/FA: Using measurement service
18790-18899/com.mypackage.name V/FA: Connecting to remote service
--------- beginning of crash
18790-18790/com.mypackage.name E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mypackage.name, PID: 18790
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mypackage.name-1/base.apk", zip file "/data/app/com.mypackage.name-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.mypackage.name-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.mypackage.name-1/lib/arm64, /data/app/com.mypackage.name-1/base.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.mypackage.name-1/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libzoom_stlport.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:984)
at java.lang.System.loadLibrary(System.java:1530)
at com.zipow.cmmlib.AppContext.<clinit>(AppContext.java:31)
at com.zipow.cmmlib.AppContext.initialize(AppContext.java:64)
at us.zoom.sdk.ZoomSDK.initialize(ZoomSDK.java:225)
at us.zoom.sdk.ZoomSDK.initialize(ZoomSDK.java:184)
at com.mypackage.name.SectionListActivity.getInitializedZoomSDK(SectionListActivity.java:857)
at com.mypackage.name.SectionListActivity.access$1500(SectionListActivity.java:88)
at com.mypackage.name.SectionListActivity$8.onClick(SectionListActivity.java:812)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22429)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
From my understanding, those project dependencies are not properly getting added with MultiDex enabled. Is there some configuration that I am missing for project dependencies?
I've also tried the following in my build.gradle file.
dexOptions {
preDexLibraries = false
}
It seems to have no effect on it. It crashes each time.
The ZoomSDK you have doesn't support 64bit Android, unfortunately. In the mean time, you need to disable the use of 64bit libraries in your app and only support the mentioned framework so it builds in 32bit mode.
Add the following to the build.gradle of the main module of your app:
android {
defaultConfig {
ndk {
abiFilters "armeabi-v7a"
}
}
}
From the Zoom forum:
We support only 32 bit libs now. To work on 64 bit devices, you should
not use other 64 bit libs ( from other projects or other third party
SDK). Android OS can support 32 bit libs on 64 bit devices if you
don't have other 64 bit libs in the project
For x86, it can be supported via Intel ARM binary translator
(Houdini). But your app should not contain other x86 targeted native
binaries.
In order for the app to run on x86, all the binary files in your app should target on ARM, binary translator will translate them to
support x86.
If your app contains other binary files that target on x86, you should delete those files to remain only ARM targets. Because on x86
devices, if an app have binary files target on x86, it also should
have the file that target on ARM. Because Zoom Android SDK does not
contains any x86 binaries, so other files also can't have binaries
that target on x86 in order for the SDK to run.
The ARM binary translator works at run time, not at compile time.
You only need to add following to main gradle file
android {
defaultConfig {
ndk {
abiFilters "armeabi-v7a"
}
}
}
and in gradle.properties file add the following line
android.useDeprecatedNdk = true