react-native-photo-view icon indicating copy to clipboard operation
react-native-photo-view copied to clipboard

Error: Native component for "PhotoViewAndroid" does not exist

Open yasir-netlinks opened this issue 6 years ago • 13 comments

I am using react-native: 0.50.4 and I'm receiving the error stated in title

photoviewerror

yasir-netlinks avatar Jan 03 '18 11:01 yasir-netlinks

I had the same issue. Then found this project : git-point and they are using react-native version 0.48.4. When I changed it, deleted node_modules and linked the package again, it worked.

juffalow avatar Jan 11 '18 01:01 juffalow

@juffalow So do you mean I have to downgrade react-native version !

yasir-netlinks avatar Jan 11 '18 05:01 yasir-netlinks

@yasir-netlinks you can try to follow the manual installation and add the required configuration into the MainApplication.java as in my case it's wasn't added automatically.

costagolub avatar Jan 19 '18 09:01 costagolub

I have the same issue with RN version 0.52.0

csath avatar Feb 12 '18 03:02 csath

me too

mohsen0311 avatar Mar 01 '18 08:03 mohsen0311

I have the same issue. I use react native 0.52.0

chithanh12 avatar Mar 04 '18 17:03 chithanh12

You can try to PhotoViewPackage() manually into your MainActivity.java for RN < 0.29 and to your MainApplication.java for RN >=0.29. It work for me.

import com.reactnative.photoview.PhotoViewPackage;

// ...

public class MainActivity extends ReactActivity {
    // ...

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new PhotoViewPackage() // add this manager
      );
    }

    // ...
}

chithanh12 avatar Mar 04 '18 17:03 chithanh12

me too

wuxiii avatar Apr 15 '18 16:04 wuxiii

me too react-native: 0.55.4

slimcheng avatar May 24 '18 06:05 slimcheng

I downgrade to RN 0.49.5 and install manually PhotoViewPackage() and it worked !

simonvdfr avatar May 24 '18 08:05 simonvdfr

Hello, I'm having a very similar error message with RN0.59 on android (it works fine with ios) : `

Invariant Violation: requireNativeComponent: "PhotoViewAndroid" was not found in the UIManager.

Any ideas on how to fix it ? (for me downgrading to an older RN version is not an option due to other dependencies). Thx

apostolou avatar Jan 29 '20 16:01 apostolou

Hello, I'm having a very similar error message with RN0.59 on android (it works fine with ios) : `

Invariant Violation: requireNativeComponent: "PhotoViewAndroid" was not found in the UIManager.

Any ideas on how to fix it ? (for me downgrading to an older RN version is not an option due to other dependencies). Thx

Any chance you figured this out? I'm encountering this with RN 0.60.4

juphamzipit avatar Apr 05 '21 20:04 juphamzipit

zulip-mobile has implemented the photoview with alwx/react-native-photo-view#c58fd6b30 version.

visibleajay avatar Dec 16 '21 14:12 visibleajay