kuldeept92 / ipcamera-for-android

Automatically exported from code.google.com/p/ipcamera-for-android
0 stars 0 forks source link

Couldn't load mp3encoder from loader dalvik.system.PathClassLoader #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
hi,

im trying to lunch the from eclipse after import the project to the workspace, 
when i run the app i'm getting this:

03-13 18:56:18.643: E/AndroidRuntime(4706): FATAL EXCEPTION: main
03-13 18:56:18.643: E/AndroidRuntime(4706): java.lang.UnsatisfiedLinkError: 
Couldn't load mp3encoder from loader 
dalvik.system.PathClassLoader[dexPath=/data/app/teaonly.droideye-2.apk,libraryPa
th=/data/app-lib/teaonly.droideye-2]: findLibrary returned null
03-13 18:56:18.643: E/AndroidRuntime(4706):     at 
java.lang.Runtime.loadLibrary(Runtime.java:365)
03-13 18:56:18.643: E/AndroidRuntime(4706):     at 
java.lang.System.loadLibrary(System.java:535)
03-13 18:56:18.643: E/AndroidRuntime(4706):     at 
teaonly.droideye.MainActivity.onCreate(MainActivity.java:101)

what i missing?

Original issue reported on code.google.com by zohar...@gmail.com on 13 Mar 2013 at 6:30

GoogleCodeExporter commented 9 years ago
It seems that you need to build the jni libraries in the jni folder using the 
Android NDK.

Original comment by zwer...@gmail.com on 31 Mar 2013 at 5:21

GoogleCodeExporter commented 9 years ago
Thanks it work's

Original comment by zohar...@gmail.com on 31 Mar 2013 at 5:37

GoogleCodeExporter commented 9 years ago
I have successfully compiled the build jni libraries. But after doing that, 
when I install the app on my phone i get:

W/dalvikvm(30891): threadid=1: thread exiting with uncaught exception 
(group=0x40a351f8)
E/AndroidRuntime(30891): FATAL EXCEPTION: main
E/AndroidRuntime(30891): java.lang.UnsatisfiedLinkError: Couldn't load 
mp3encoder: findLibrary returned null
E/AndroidRuntime(30891):    at java.lang.Runtime.loadLibrary(Runtime.java:365)
E/AndroidRuntime(30891):    at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime(30891):    at 
teaonly.droideye.MainActivity.onCreate(MainActivity.java:108)
E/AndroidRuntime(30891):    at 
android.app.Activity.performCreate(Activity.java:4465)
E/AndroidRuntime(30891):    at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
E/AndroidRuntime(30891):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
E/AndroidRuntime(30891):    at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
E/AndroidRuntime(30891):    at 
android.app.ActivityThread.access$600(ActivityThread.java:123)
E/AndroidRuntime(30891):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
E/AndroidRuntime(30891):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(30891):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(30891):    at 
android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime(30891):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime(30891):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(30891):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
E/AndroidRuntime(30891):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
E/AndroidRuntime(30891):    at dalvik.system.NativeStart.main(Native Method)

Thanks!

Original comment by Shub...@raasio.com on 11 Jun 2013 at 8:59

GoogleCodeExporter commented 9 years ago
hwy how to compile jni libraries using ndk ? im new to this please help

Original comment by 9cha...@gmail.com on 21 Jul 2013 at 11:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
How compile using Cygwin?

Original comment by Hkan...@gmail.com on 8 Aug 2013 at 10:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am new to NDK When I am trying to compile the library its giving me error

C:\Users\PWDC9615\git\android-eye>ndk-build
"Compile thumb : mp3encoder <= bitstream.c
jni/libmp3lame/bitstream.c: In function 'do_gain_analysis':
jni/libmp3lame/bitstream.c:992:24: warning: unused variable 'rov' 
[-Wunused-variable]
jni/libmp3lame/bitstream.c:991:32: warning: unused variable 'rsv' 
[-Wunused-variable]
jni/libmp3lame/bitstream.c:990:34: warning: unused variable 'cfg' 
[-Wunused-variable]
"Compile thumb : mp3encoder <= fft.c
"Compile thumb : mp3encoder <= id3tag.c
"Compile thumb : mp3encoder <= mpglib_interface.c
"Compile thumb : mp3encoder <= presets.c
In file included from jni/libmp3lame/presets.c:29:0:
jni/libmp3lame/set_get.h:24:18: fatal error: lame.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/mp3encoder/libmp3lame/presets.o] Error 1

C:\Users\PWDC9615\git\android-eye>

Original comment by min2bhan...@gmail.com on 22 Sep 2013 at 11:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In set_get.h replace
#include <lame.h>
with
#include “lame.h”

Original comment by sridhark...@gmail.com on 15 Jan 2014 at 9:59

GoogleCodeExporter commented 9 years ago
hi im new to android having a similar problem .. i have installed ndk but dont 
know how to instantiate it with application im getting the following error any 
help would be gratefully appreciated .. 

03-22 17:32:01.280: E/AndroidRuntime(12214): java.lang.UnsatisfiedLinkError: 
Couldn't load mp3encoder from loader 
dalvik.system.PathClassLoader[dexPath=/data/app/teaonly.droideye-2.apk,libraryPa
th=/data/app-lib/teaonly.droideye-2]: findLibrary returned null

Original comment by nasirshi...@gmail.com on 22 Mar 2014 at 5:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

I resolved this issue by rebuild the JNI code for all those beginners like me 
who are not NDK friendly,

All you need to install the NDK from below URL:

http://developer.android.com/tools/sdk/ndk/index.html

Please make sure that you have set the environment variables like

    NDK_HOME -- \android-ndk-r9 {directory must contain `ndk-build` file}
    Path -- %NDK_HOME%

open the command prompt go to the directory where JNI code exist, mine under 
the below path

    cd C:{rootpath}\android-eye-master\jni
    C:{rootpath}\android-eye-master\jni>ndk-build

Then refresh your android project in eclipse and run as Android Application.

Original comment by min2bhan...@gmail.com on 16 Jul 2014 at 6:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had the same issue and I solved it by building JNI with ndk. The following 
link shows how to setup the project properties to build with ndk-build. Note 
that you might replace ndk-build shown in the tutorial with the executable 
ndk-build.cmd if you are running eclipse on windows.  

http://mobilepearls.com/labs/ndk-builder-in-eclipse/

Hope Y'all find it helpful.

Best,
Muhammed

Original comment by kingofb...@gmail.com on 21 Jul 2014 at 3:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi I am new to NDK. When i tried  to build the  JNI it shows following error.

C:\Users\USER\workspace\MainActivity\jni>ndk-build
Android NDK: ERROR:C:/Users/USER/workspace/android-eye/jni/Android.mk:x264_pre:
LOCAL_SRC_FILES points to a missing file
Android NDK: Check that C:/Users/USER/workspace/android-eye/jni/x264/libx264.a e
xists  or that its path is correct
E:/ms/ndk/android-ndk-r10e/build/core/prebuilt-library.mk:45: *** Android NDK: A
borting    .  Stop.

Original comment by akhil.ms...@iiitmk.ac.in on 19 Jun 2015 at 6:45