matthewn4444 / VPlayer_lib

Simple FFmpeg library for android for multiple architectures
Apache License 2.0
44 stars 13 forks source link

Method not found Exception #4

Closed CptCattivo closed 8 years ago

CptCattivo commented 8 years ago

Hi,

i want to build my own layout with the VPlayerView integrated in it. I followed your instructions in the "Integrations Tutorial - Layout Examplel", but when i try to build the project it throws a "NoSuchMethodException" like in the error log below. How can I fix this?

Thank you in advance.

06-17 16:32:42.459 10073-10073/com.example.christian.myvplayer E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.christian.myvplayer, PID: 10073 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.christian.myvplayer/com.example.christian.myvplayer.MainActivity}: android.view.InflateException: Binary XML file line #14: Error inflating class com.vplayer.VPlayerView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5258) 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:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: android.view.InflateException: Binary XML file line #14: Error inflating class com.vplayer.VPlayerView at android.view.LayoutInflater.createView(LayoutInflater.java:616) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.example.christian.myvplayer.MainActivity.onCreate(MainActivity.java:26) at android.app.Activity.performCreate(Activity.java:6006) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1116) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)  at android.app.ActivityThread.access$800(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5258)  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:903)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)  Caused by: java.lang.NoSuchMethodException: [class android.content.Context, interface android.util.AttributeSet] at java.lang.Class.getConstructor(Class.java:531) at java.lang.Class.getConstructor(Class.java:495) at android.view.LayoutInflater.createView(LayoutInflater.java:580) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)  at com.example.christian.myvplayer.MainActivity.onCreate(MainActivity.java:26)  at android.app.Activity.performCreate(Activity.java:6006)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1116)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)  at android.app.ActivityThread.access$800(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5258)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)

matthewn4444 commented 8 years ago

Did you do this? https://github.com/matthewn4444/VPlayer_lib/wiki/Compiling-VPlayer

Looks like you may have forgotten the binary files (*.so)

CptCattivo commented 8 years ago

Stupid me. It works now. Thank you very much!