TharinduAmila / AndroidSFMDemo

3 stars 3 forks source link

java.lang.UnsatisfiedLinkError #1

Open thenswan opened 9 years ago

thenswan commented 9 years ago

Hello, I'm getting this error. Could you help me, please?

java.lang.UnsatisfiedLinkError: Couldn't load AndroidSFM from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.androidsfmdemo-2.apk,libraryPath=/data/app-lib/com.example.androidsfmdemo-2]: findLibrary returned null
        at java.lang.Runtime.loadLibrary(Runtime.java:365)
        at java.lang.System.loadLibrary(System.java:535)
        at com.example.androidsfmdemo.MainActivity$1.onManagerConnected(MainActivity.java:131)
        at org.opencv.android.AsyncServiceHelper$3.onServiceConnected(AsyncServiceHelper.java:318)
        at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1101)
        at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1118)
        at android.os.Handler.handleCallback(Handler.java:725)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5041)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
        at dalvik.system.NativeStart.main(Native Method)
thenswan commented 9 years ago

Can you add .so files, please?

TharinduAmila commented 9 years ago

HI, Did you build the cpp files in the project? It'll take me another 9-10hrs before I can check if I can give you the so files because of work.

On Tue, Jul 21, 2015 at 9:13 PM, NickSw notifications@github.com wrote:

Can you add .so files, please?

— Reply to this email directly or view it on GitHub https://github.com/TharinduAmila/AndroidSFMDemo/issues/1#issuecomment-123378675 .

Thanks and regards, Tharindu Amila Perera Undergraduate Department of Computer Science & Engineering University of Moratuwa

thenswan commented 9 years ago

I found out that i can't build them on windows and i'll wait for so files. Thanks.

AGPBI: {"kind":"SIMPLE","text":"In file included from C:\Coding\AndroidSFMDemo-master\app\src\main\jni\AndroidSFM.cpp:1:0:","position":{},"original":"In file included from C:\Coding\AndroidSFMDemo-master\app\src\main\jni\AndroidSFM.cpp:1:0:"} AGPBI: {"kind":"SIMPLE","text":"C:\Coding\AndroidSFMDemo-master\app\src\main\jni/headers/SFMlib.h:4:30: fatal error: opencv2/opencv.hpp: No such file or directory","position":{},"original":"C:\Coding\AndroidSFMDemo-master\app\src\main\jni/headers/SFMlib.h:4:30: fatal error: opencv2/opencv.hpp: No such file or directory"} AGPBI: {"kind":"SIMPLE","text":" #include \u003copencv2/opencv.hpp\u003e","position":{},"original":" #include \u003copencv2/opencv.hpp\u003e"} AGPBI: {"kind":"SIMPLE","text":" ^","position":{},"original":" ^"} AGPBI: {"kind":"SIMPLE","text":"compilation terminated.","position":{},"original":"compilation terminated."} AGPBI: {"kind":"SIMPLE","text":"make.exe: * [C:\Coding\AndroidSFMDemo-master\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/lapack/C_\Coding\AndroidSFMDemo-master\app\src\main\jni\AndroidSFM.o] Error 1","position":{},"original":"make.exe: * [C:\Coding\AndroidSFMDemo-master\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/lapack/C_\Coding\AndroidSFMDemo-master\app\src\main\jni\AndroidSFM.o] Error 1"}

TharinduAmila commented 9 years ago

I checked the project and I can still build and successfully install it to an android phone. Anyhow this project only include a very basic implementation of structure from motion. You will have to do major development to get it to a good standard. From the above errors it seems you have not setup opencv4android in your machine. (opencv2/opencv.hpp: No such file or directory) . The .so file is in the folder preBuilt. Hope this helps.

thenswan commented 9 years ago

Thanks

thenswan commented 9 years ago

When I press sparse button getting this errors

backtrace: 07-23 17:32:11.352 195-195/? A/DEBUG﹕ #00 pc 00041c08 /system/lib/libc.so (tgkill+12) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #01 pc 0003f94d /system/lib/libc.so (pthread_kill+32) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #02 pc 0001c193 /system/lib/libc.so (raise+10) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #03 pc 00019421 /system/lib/libc.so (libc_android_abort+34) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #04 pc 0001740c /system/lib/libc.so (abort+4) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #05 pc 002f9667 /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (gnu_cxx::verbose_terminate_handler()+182) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #06 pc 002f5ef1 /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (cxxabiv1::terminate(void (*)())+4) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #07 pc 002f5f21 /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (std::terminate()+12) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #08 pc 002f603f /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (cxathrow+114) 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #09 pc 0009cea9 /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (cvsba::Sba::run(std::vectorcv::Point3<double, std::allocatorcv::Point3 >&, std::vectorstd::vector<cv::Point<double, std::allocatorcv::Point >, std::allocatorstd::vector<cv::Point<double, std::allocatorcv::Point > > > const&, std::vector<std::vector<int, std::allocator >, std::allocator<std::vector<int, std::allocator > > > const&, std::vector<cv::Mat, std::allocator<c 07-23 17:32:11.353 195-195/? A/DEBUG﹕ #10 pc 000a1cdd /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (twoViewBundleAdjustment(cv::Mat, std::vectorcv::Point3<double, std::allocatorcv::Point3 >&, std::vectorstd::vector<cv::Point<double, std::allocatorcv::Point >, std::allocatorstd::vector<cv::Point<double, std::allocatorcv::Point > > >, cv::Matx<double, 3, 4>, std::vector<cv::Matx<double, 3, 4>, std::allocator<cv::Matx<double, 3, 4> > >&)+1196) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #11 pc 000a7d1d /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (doSparseReconstruction(std::vector<MFramePair, std::allocator >&, cv::Mat_, MGraph&)+1724) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #12 pc 0009ed77 /data/app/com.example.androidsfmdemo-2/lib/arm/libAndroidSFM.so (Java_com_example_androidsfmdemo_MainActivity_runSparseReconstruction+150) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #13 pc 003de731 /data/app/com.example.androidsfmdemo-2/oat/arm/base.odex (int com.example.androidsfmdemo.MainActivity.runSparseReconstruction()+76) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #14 pc 003de935 /data/app/com.example.androidsfmdemo-2/oat/arm/base.odex (void com.example.androidsfmdemo.MainActivity.doSparseReconstruction(android.view.View)+136) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #15 pc 000e67b1 /system/lib/libart.so (art_quick_invoke_stub_internal+64) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #16 pc 003fee95 /system/lib/libart.so (art_quick_invoke_stub+188) 07-23 17:32:11.354 195-195/? A/DEBUG﹕ #17 pc 007fe05c [stack]

So can you please add apk? i want to see how it works so much

Aozhi commented 7 years ago

Excuse me, would you like to explain the concrete process that how to make it runnable after downloading from git? I download it and put in into eclipse but it shows ndk-build does not exist.

TharinduAmila commented 7 years ago

Have you installed and setup the ndk tools. I have recently not worked with this code base and does not have a working setup.

On Sun, Sep 25, 2016 at 3:44 PM, Aozhi notifications@github.com wrote:

Excuse me, would you like to explain the concrete process that how to make it runnable after downloading from git? I download it and put in into eclipse but it shows ndk-build does not exist.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TharinduAmila/AndroidSFMDemo/issues/1#issuecomment-249413640, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQ_m9tlH-5TdpdO7DU-IcxEWqB9zqF5ks5qtklxgaJpZM4Fcwiv .

Thanks and regards, Tharindu Amila Perera Undergraduate Department of Computer Science & Engineering University of Moratuwa

Aozhi commented 7 years ago

Thanks quite a lot! I'll try it.