teamairship / react-native-android-fullscreen-webview-video

64 stars 53 forks source link

Library is not working on RN 0.60 #27

Open mikaoelitiana opened 5 years ago

mikaoelitiana commented 5 years ago

I am upgrading my RN project to RN 0.60 and got the following error from react-native-android-fullscreen-webview-video when compiling :

/node_modules/react-native-android-fullscreen-webview-video/android/src/main/java/com/airship/customwebview/CustomWebViewManager.java:55: error: package com.facebook.react.views.webview does not exist
import com.facebook.react.views.webview.WebViewConfig;
                                       ^
adambeck7 commented 5 years ago

Having the same issue.

erenilhan commented 5 years ago

Same issue +1

mikaoelitiana commented 5 years ago

I have fixed this issue and created a PR #28 but now I am getting another issue :

Requiring module "index.android.js", which threw an exception: Invariant Violation: Tried to register two views with the same name RNCWebView
mikaoelitiana commented 5 years ago

I finally found the cause of this last issue, I had to set same version of react-native-webview in my root project as in react-native-android-fullscreen-webview-video:

"react-native-webview": "^5.12.1",
nguyen95 commented 5 years ago

Please merge pull request from @mikaoelitiana

amhinson commented 5 years ago

It looks like react-native-webview supports fullscreen Android video now, so there might actually not be a need for this library anymore: https://github.com/react-native-community/react-native-webview/pull/325

Would someone be able to confirm that is the case?

mikaoelitiana commented 5 years ago

@amhinson thanks for pointing that. I will try if this is working.

kesepara commented 5 years ago

@mikaoelitiana can you confirm that if react native's webview supports that?

mikaoelitiana commented 5 years ago

Yes as far as I know it works fine

kesepara commented 5 years ago

@mikaoelitiana thanks man, i will try.

igchuk commented 4 years ago

The quickest fix is to change in iosWebView.js

import { WebView } from 'react-native';

to

import { WebView } from 'react-native-webview';`

And yes react-native-webview has to be installed.

loukrath commented 4 years ago

I got some error after I run react-native run-android.

amhinson commented 4 years ago

@loukrath I'd recommend just using react-native-webview, as they've added support for precisely what this library was created for.

loukrath commented 4 years ago

@loukrath I'd recommend just using react-native-webview, as they've added support for precisely what this library was created for.

@amhinson It works for me, thanks