Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Fail to initialize JWVrVideoView view.


Hi,

I am trying integrating jw vr player into my android application. First, I downloaded the sample code from Github
https://github.com/jwplayer/jwplayer-android-best-practice-apps/tree/master/360-video-sample
followed the instruction, added necessary libraries and license key. It always stop at the line setContentView(R.layout.activity_video); with error:

(Caused by: java.lang.NoSuchFieldError: No static field mc_seek_bar of type I in class Lcom/longtailvideo/jwplayer/vr/R$id; or its superclasses (declaration of 'com.longtailvideo.jwplayer.vr.R$id' appears in /data/app/com.jwplayer.demo.vrsample-1/base.apk))

Then, I found an answer with a working sample code at http://qa.jwplayer.com.s3.amazonaws.com/~george/dima_360.zip. It works well.
So, I copied all files into my project, from libs folder, gradle files, java source codes, however it throws the same error as above. I then compared dima_360.zip source code and Github source code but don't see any different. That's really strange, please let me know if you have any idea.

Thanks.

3 Community Answers

George

JW Player Support Agent  
0 rated :

Try starting with the working demo and migrate your java code step by step. You wouldn’t need any extra gradle imports.

Binh Nguyen

User  
0 rated :

The git hub project doesn't work until I override gradle file from working demo. Copying gradle content didn't help. Strange, I did clean up everything.
On my project, jw vr player view conflicts with a layout media_controller.xml in my project, renaming it makes it works. Weird.
Anyway, finally can include vr in my application. Great job!

George

JW Player Support Agent  
0 rated :

Cool

This question has received the maximum number of answers.