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

jsc:r174650 has "duplicate entry: javax/annotation/Nullable.class" when react android 0.15.0

Open yipengmu opened this issue 10 years ago • 4 comments

org.webkit.android-jsc.version=r174650

a problem attach to me when i use react native android 0.15.0:

duplicate entry: javax/annotation/Nullable.class

in abjectively case , another maven GAV also has Nullable which the package is also javax.annotation. even i can exclude an dependence a GAV ,bug i can't exclude all the files in an exist package,opps!

seem to https://github.com/johncarl81/parceler/issues/13

can @kmagiera @mkonicek help me and tell me how to sovle it.

https://github.com/yipengmu/react-native-android-lession/blob/master/pics/jsc-bug.png jsc-annotation-bug

yipengmu avatar Dec 10 '15 13:12 yipengmu

Hey yipengmu, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If this is a feature request or a bug that you would like to be fixed by the team, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • We welcome clear issues and PRs that are ready for in-depth discussion; thank you for your contributions!

facebook-github-bot avatar Dec 10 '15 13:12 facebook-github-bot

Duplicate of https://github.com/facebook/android-jsc/issues/10, let's discuss there as it looks related to the JSC binary.

mkonicek avatar Dec 13 '15 14:12 mkonicek

it's not related to facebook/android-jsc#10, I think @yipengmu mistaken JSC for JSR. Let's instead discuss it here.

@yiminghe So it looks like there is a conflict with @Nullable class being provided twice. The question is what kind of additional dependencies you're adding to your project that may cause that conflict.

Worst case you can update your gradle file to exclude dependency on "JSR" in a way illustrated here (search for an example with "exclude" keyword).

I haven't tried it but I think you should replace dependency on react-native in your app's gradle file with something like:

compile('com.facebook.react:react-native:0.16.+') {
    exclude module: 'jsr305'
}

kmagiera avatar Dec 14 '15 08:12 kmagiera

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/jscr174650-has-duplicate-entry-javaxannotationnullableclass-when-react-android-0150

ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix. We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

mkonicek avatar Apr 10 '16 16:04 mkonicek