alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
816 stars 434 forks source link

Error: Native component for "PhotoViewAndroid" does not exist #142

Open yasir-netlinks opened 6 years ago

yasir-netlinks commented 6 years ago

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

photoviewerror

juffalow commented 6 years ago

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 _nodemodules and linked the package again, it worked.

yasir-netlinks commented 6 years ago

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

costagolub commented 6 years ago

@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.

csath commented 6 years ago

I have the same issue with RN version 0.52.0

mohsen0311 commented 6 years ago

me too

chithanh12 commented 6 years ago

I have the same issue. I use react native 0.52.0

chithanh12 commented 6 years ago

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
      );
    }

    // ...
}
wuxiii commented 6 years ago

me too

slimcheng commented 6 years ago

me too react-native: 0.55.4

simonvdfr commented 6 years ago

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

apostolou commented 4 years ago

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

juphamzipit commented 3 years ago

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

visibleajay commented 2 years ago

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