RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
226 stars 28 forks source link

Video wont play when built and run on Android device #465

Closed nsmith1024 closed 3 years ago

nsmith1024 commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

Build for Android device, videos wont play

Your Setup (please complete the following information):

To Reproduce

  1. Build for target Android

Logs If applicable, add error logs to help explain your problem.

2020-09-14 16:51:42.738 8920-8960/com.myApp.myApp E/Unity: AndroidJavaException: java.lang.ClassNotFoundException: com.RenderHeads.AVProVideo.AVProMobileVideo java.lang.ClassNotFoundException: com.RenderHeads.AVProVideo.AVProMobileVideo at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:454) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:237) at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.RenderHeads.AVProVideo.AVProMobileVideo" on path: DexPathList[[zip file "/data/app/com.myApp.myApp-E1ofahm_UZkUBdJJacwCgg==/base.apk"],nativeLibraryDirectories=[/data/app/com.myApp.myApp-E1ofahm_UZkUBdJJacwCgg==/lib/arm64, /data/app/com.myApp.myApp-E1ofahm_UZkUBdJJacwCgg==/base.apk!/lib/arm64-v8a, /system/lib64]

nsmith1024 commented 3 years ago

Seems if i uncheck "debug build" in the Build Settings, it stops working (the video doesnt play and i get the error above i the log cat).

if i have Debug Build check it works. Im using the demo version of your player. So the demo version of your player only works with a debug build?

AndrewRH commented 3 years ago

Hi this is probably caused by making an ARM64 build. You can fix this by one of 2 ways:

1) Go to Player Settings and changing the build architecture to remove ARM64 2) Go to /Plugins/Android/libs/arm64-v8a and select each file and assign the correct CPU architecture. You can find reference to that here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/112#issuecomment-509605543

I hope that helps solve the problem.

Thanks,

nsmith1024 commented 3 years ago

problem has been fixed