Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We just tried to add listener, you won't believe what happens next #12580

Closed
rusfearuth opened this issue Feb 25, 2017 · 5 comments
Closed

We just tried to add listener, you won't believe what happens next #12580

rusfearuth opened this issue Feb 25, 2017 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@rusfearuth
Copy link

Description

I'd decided to add PermissionListener to ReactActivity#requestPermissions. Android Studio showed me that PermissionListener was missing in com.facebook.react:react-native:+. I dived deep and found that react-native for Android is v0.20.1 and it didn't have a lot of interfaces, classes and etc. How could it be possible? Why is ReactNative 0.41.2 in Github and 0.20.1 in maven?

I'd tried to ignore errors from Android Studio and I added imports and wrote code with using of PermissionListener and It's worked!

Does anybody know what it is?

Reproduction

Just create native module for Android and use PermissionListener.

Additional Information

  • React Native version: 0.41.2
  • Platform: Android
  • Operating System: MacOS
@rusfearuth rusfearuth changed the title We tried to add listener, you won't believe what happens next We just tried to add listener, you won't believe what happens next Feb 25, 2017
@hey99xx
Copy link

hey99xx commented Feb 27, 2017

Because react-native no longer publishes to maven; but only to npm. Also shame on you for clickbait title

@rusfearuth
Copy link
Author

@hey99xx 'cos I haven't found any information about it in docs.

@hey99xx
Copy link

hey99xx commented Feb 27, 2017

That doesn't make your title any better. Also it is explained in this link http://facebook.github.io/react-native/docs/integration-with-existing-apps.html

  1. Install react-native in your Android application root directory to create node_modules/ directory.
  1. Add com.facebook.react:react-native:+ and a maven pointing to the react-native binaries in node_modules/ to your build.gradle file.

You're likely missing these steps. Instead of pointing to public maven, which only has up to 0.20, you need to use your node_modules directory.

@rusfearuth
Copy link
Author

@hey99xx hmmm.... But why? Using node_modules looks like a workaround =/ I won't believe that so strong programmers from Facebook wouldn't build and upload JAR to maven )

Okey, it doesn't matter. Thanks for help )

@Etheryte
Copy link
Contributor

See #6459 (comment)

@hramos hramos closed this as completed Feb 28, 2017
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants