0
votes

Compiled transplant FFmpeg using the NDK in ubuntu,After the success of the compilation, Run under the eclipse will appear "cannot locate 'log2f" error

09-09 12:03:31.152: W/dalvikvm(31395): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/example/ffmpegtest/MainActivity;

09-09 12:03:31.152: W/dalvikvm(31395): Class init failed in newInstance call (Lcom/example/ffmpegtest/MainActivity;)

09-09 12:03:31.162: W/dalvikvm(31395): threadid=1: thread exiting with uncaught exception (group=0x40ce12d0)

09-09 12:03:31.162: E/AndroidRuntime(31395): FATAL EXCEPTION: main

09-09 12:03:31.162: E/AndroidRuntime(31395): java.lang.ExceptionInInitializerError

09-09 12:03:31.162: E/AndroidRuntime(31395): at java.lang.Class.newInstanceImpl(Native Method)

09-09 12:03:31.162: E/AndroidRuntime(31395): at java.lang.Class.newInstance(Class.java:1319)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1874)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1984)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.app.ActivityThread.access$600(ActivityThread.java:126)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1150)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.os.Handler.dispatchMessage(Handler.java:99)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.os.Looper.loop(Looper.java:137)

09-09 12:03:31.162: E/AndroidRuntime(31395): at android.app.ActivityThread.main(ActivityThread.java:4456)

09-09 12:03:31.162: E/AndroidRuntime(31395): at java.lang.reflect.Method.invokeNative(Native Method)

09-09 12:03:31.162: E/AndroidRuntime(31395): at java.lang.reflect.Method.invoke(Method.java:511)

09-09 12:03:31.162: E/AndroidRuntime(31395): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)

09-09 12:03:31.162: E/AndroidRuntime(31395): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)

09-09 12:03:31.162: E/AndroidRuntime(31395): at dalvik.system.NativeStart.main(Native Method)

09-09 12:03:31.162: E/AndroidRuntime(31395): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1287]: 143 cannot locate 'log2f'...

09-09 12:03:31.162: E/AndroidRuntime(31395): at java.lang.Runtime.loadLibrary(Runtime.java:370)

09-09 12:03:31.162: E/AndroidRuntime(31395): at java.lang.System.loadLibrary(System.java:535)

09-09 12:03:31.162: E/AndroidRuntime(31395): at com.example.ffmpegtest.MainActivity.(MainActivity.java:23)

09-09 12:03:31.162: E/AndroidRuntime(31395): ... 15 more

1

1 Answers

0
votes

run your ndk build again using V=1 , B switches and check the build logs for link errors.

run the debug build and install the debug apk to a device ( not emulator )

see whether you get the same error?

wild guess is that you will.

Then you will have to track down why your link did not include log2f lib.