I have followed the directions here OpenCV in Android Studio the one that has 94 votes. I get this error when I dod System.loadlibrary("opencv-java")
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/com.krikorherlopian.opencvsample-
1/base.apk"],nativeLibraryDirectories=
[/data/app/com.krikorherlopian.opencvsample-1/lib/arm,
/data/app/com.krikorherlopian.opencvsample-1/base.apk!/lib/armeabi-
v7a, /vendor/lib, /system/lib]]] couldn't find "libopencv_java.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.krikorherlopian.opencvsample.MainActivity.onCreate(MainActivity.java:13)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
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)
EDIT: I still get the error , and I have the ndk added . Krikors-MacBook-Air:~ KrikorHerlopian$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/KrikorHerlopian/Downloads/adt-bundle-mac-x86_64-20140702/sdk/ndk-bundle
Whats the problem?
Edit2: Now I got problem of Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /Users/KrikorHerlopian/Downloads/adt-bundle-mac-x86_64-20140702/sdk/ndk-bundle//jni/Android.mk when i try running my app from the terminal using /Users/KrikorHerlopian/Downloads/adt-bundle-mac-x86_64-20140702/sdk/ndk-bundle/ndk-build
Related
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
I am getting error while opening scanning bar code on the below line of code:
static
{
System.loadLibrary("iconv");
}
After that getting run time exception as mentioned below:
02-19 00:35:54.101 17727-17727/com.trialliancebarcode E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.trialliancebarcode, PID: 17727
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.trialliancebarcode-1/lib/arm/libiconv.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.trialliancebarcode.BarcodeScanner.<clinit>(BarcodeScanner.java:48)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1090)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Please help me on this.
i'm not using ZBAR but i work on project Reading barcode
i use mobile vision Api supported by google try it
Check this Link
Please try this:
Download the latest ZBar project here
grab the latest .so from barcodescanner/zbar/src/main/jniLibs, and replace the relative .so in your project.
Run your app.
(Works well targetSdkVersion 25, buildToolsVersion '25.0.3', compileSdkVersion 25, or below)
App is working fine prior to Marshmallow. Here is the logcat.
E/PjService: We have a problem with the current stack.... NOT YET Implemented
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "BN_nist_mod_521" referenced by "/data/app/xx.xx-1/lib/arm/libsip.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at xx.xx.xx.PjSipService.tryToLoadStack(PjSipService.java:99)
at xx.xx.xx.SipService.loadStack(SipService.java:1050)
at xx.xx.xx.SipService.onStart(SipService.java:1011)
at android.app.Service.onStartCommand(Service.java:459)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3010)
at android.app.ActivityThread.-wrap17(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1442)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
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)
AND
E/art: No implementation found for void org.pjsip.pjsua.pjsuaJNI.swig_module_init() (tried Java_org_pjsip_pjsua_pjsuaJNI_swig_1module_1init and Java_org_pjsip_pjsua_pjsuaJNI_swig_1module_1init__)
Can anyone guide me what to do?
i was looking for a torrent library for android and came-across ttorrent
.when i tried to add dependencty to gradle it gave me errors regarding slf4j-log4j12.
i ended up adding all jar files manually and managed to run the app using sample code.
But i am getting this error now.
ClassLoader referenced unknown path: /data/app/com.test.torrent-1/lib/arm64
android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273)
at java.net.InetAddress.lookupHostByName(InetAddress.java:431)
at java.net.InetAddress.getLocalHost(InetAddress.java:409)
at com.test.torrent.MainActivity.onCreate(MainActivity.java:26)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
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)
i think it is trying to find a library but i cannot find it , that path does not exist in my mobile , any help?
I am trying to run the QR scanner app downloaded from
http://kvenkataprasad.blogspot.in/2015/01/bar-code-and-qr-code-scanner-example.html?showComment=1449051540990#c226949441944394510
App getting started but when I am clicking the scan button, the app get crashed.
Following the log of crash.
13239-13239/com.kvprasad.zbarbarcodescanner E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.kvprasad.zbarbarcodescanner, PID: 13239
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.kvprasad.zbarbarcodescanner-1/lib/arm/libzbarjni.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at net.sourceforge.zbar.ImageScanner.<clinit>(Unknown Source)
at com.kvprasad.zbarbarcodescanner.BarcodeScanner.initControls(BarcodeScanner.java:52)
at com.kvprasad.zbarbarcodescanner.BarcodeScanner.onCreate(BarcodeScanner.java:42)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
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)
I am not getting the main issue behind crashing because I am a newbie in android. Please guide me to solve the problem.
Thanks.