Opentok library stopped working on S7 edge - android

it was working prev but its crashing from today
Device
Galaxy S7 Edge (hero2lte)
Manufacturer Samsung Android version
Android 6.0 RAM (MB) 4096 OpenGL ES version 3.1 Native platform
armeabi-v7a CPU make Samsung CPU model Exynos 8890
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.metronomic.materno-2/base.apk"],nativeLibraryDirectories=[/data/app/com.metronomic.materno-2/lib/arm64, /data/app/com.metronomic.materno-2/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libopentok.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.opentok.android.Session.<clinit>(Session.java:52)
at com.metronomic.pregnancy.VideoConsultActivity.sessionConnect(VideoConsultActivity.java:506)
at com.metronomic.pregnancy.VideoConsultActivity.onCreate(VideoConsultActivity.java:155)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3207)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350)
at android.app.ActivityThread.access$1100(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Just found a solution:
Add this to app level gradle .
defaultConfig {
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
But i want to know in detail why and what is difference , after adding this code snippet .

Related

Adobe Android ANE support armeabi

I am integrating Twilio video in android with my adobe air app. I can successfully add video sdk in ane but twilio video sdk uses com.getkeepsafe.relinker SDK.
This SDK gives me below error
Process: air.TestApp, PID: 585
java.lang.RuntimeException: Unable to start activity ComponentInfo{air.TestApp/com.nethram.video.views.MainActivity}: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/libjingle_peerconnection_so.so
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2456)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/libjingle_peerconnection_so.so
at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:85)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
at com.twilio.video.MediaFactory.instance(MediaFactory.java:47)
at com.twilio.video.LocalAudioTrack.create(LocalAudioTrack.java:98)
at com.twilio.video.LocalAudioTrack.create(LocalAudioTrack.java:75)
at com.nethram.video.views.MainActivity.createAudioAndVideoTracks(MainActivity.java:260)
at com.nethram.video.views.MainActivity.onCreate(MainActivity.java:131)
at android.app.Activity.performCreate(Activity.java:6304)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
When I look into this error, I think this package uses armeabi split.
Is there any method to resolve this issue?
When packaging an ANE that uses an SDK that relies on native (jni) libraries you need to ensure they are also included in your ANE package. These must be placed in the libs directory in the appropriate architecture directory (armeabi etc).
If dealing with an aar file, then you can simply check if it contains a jni directory and copy it's contents to the libs directory in your ANE platform implementation.
You should end up with the following structure:
[ANDROID_PLATFORM]/
your_ane_implementation.jar
your_ane_res/
libs/
armeabi/
libXXXXX.so
armeabi-v7a/
libXXXXX.so
...

Android Application dosent work on release mode on device with api 21&22

For some reason my application dosent work in release mode (in debug mode everything is fine) on devices with api 21&22
when i am trying to lounch the app i am getting this error
java.lang.RuntimeException: Unable to instantiate application com.example.MyApplication: java.lang.ClassNotFoundException: Didn't find class "com.example.MyApplication" on path: DexPathList[[zip file "/data/app/com.example-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example-1/lib/arm64, /vendor/lib64, /system/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:566)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4534)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5291)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
Try this: use the same version android support library in your project and library projects you included.
After Clean and Rebuild.

MuPDF Library not working on X86 architectures

This question was already asked by someone, But there i can't find any clues about the issue. I am using MuPDF library to open and preview the .pdf files in our Android application. It's working fine other than few X86 architecture devices. I got the following issue
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.demo-1/lib/x86/libmupdf.so" has unexpected e_machine: 40
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:988)
at com.artifex.mupdfdemo.MuPDFCore.(MuPDFCore.java:19)
at com.demo.openwith.OpenwithFragment.openFile(OpenwithFragment.java:789)
at com.demo.openwith.OpenwithFragment.openPDF(OpenwithFragment.java:671)
at com.demo.openwith.OpenwithFragment.onCreateView(OpenwithFragment.java:346)
at android.app.Fragment.performCreateView(Fragment.java:2053)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.app.BackStackRecord.run(BackStackRecord.java:834)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452)
at android.app.Activity.performStart(Activity.java:6047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
previously i have used the old library(.so) of the MuPDF. Now i have updated the recent library, even i am getting the same issue. Can anyone help me to find the reason and fix the issue.
create libs folder in app/src/main
then create folder x86 download this file and insert it
https://github.com/minaairsupport/MuPDF_Android_Studio/blob/master/app/src/main/jniLibs/x86/libmupdf_java.so

Mupdf lib crash on Samsung Galaxy Edge 6

I have following libs in my project :
Armeabi , Armeabi-v7a , mips , x86 they all have libmupdf.so while Samsung device looking for lib/arm64.
I am getting below crash on Samsung Galaxy Edge 6 .
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.engagebeyond.sasol-1/base.apk"],nativeLibraryDirectories=[/data/app/com.engagebeyond.sasol-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libmupdf.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
at com.artifex.mupdflib.MuPDFCore.<clinit>(MuPDFCore.java:14)
at com.artifex.mupdflib.MuPDFActivity.openFile(MuPDFActivity.java:233)
at com.artifex.mupdflib.MuPDFActivity.onCreate(MuPDFActivity.java:445)
at android.app.Activity.performCreate(Activity.java:6500)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
at android.app.ActivityThread.access$1000(ActivityThread.java:198)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6837)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Do any one known how i can build lib for arm64 ?
As this phone will run 32bit libraries, one option is to just disable 64 for your application, which will then allow the Armeabi-v7a library to be used.
The easiest way to do this is using the abiFilter setting, see https://stackoverflow.com/a/30799825/292166

Android BarcodeScanner library crash in 64bits devices

We have an application using the Zbar library from BarcodeScanner with gradle:
compile 'me.dm7.barcodescanner:zbar:1.8.2'
Scanning works fine in all the devices except for those with 64bit. When we launch the scanner the screen turn black and we receive an exception:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/my.package.name-2/base.apk"],nativeLibraryDirectories=[/data/app/my.package.name-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libiconv.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:989)
at me.dm7.barcodescanner.zbar.ZBarScannerView.(ZBarScannerView.java:31)
at my.package.name.activity.BarcodeActivity.onCreate(BarcodeActivity.java:19)
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2879)
at android.app.ActivityThread.access$900(ActivityThread.java:182)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6141)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
It seems to be fixed in 1.8.4.
Try using version 1.9
compile 'me.dm7.barcodescanner:zbar:1.9'

Categories

Resources