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

cannot override getUseDeveloperSupport() as protected #38

Closed
lc3t35 opened this issue Feb 5, 2017 · 8 comments
Closed

cannot override getUseDeveloperSupport() as protected #38

lc3t35 opened this issue Feb 5, 2017 · 8 comments

Comments

@lc3t35
Copy link

lc3t35 commented Feb 5, 2017

When I execute : npm run run:android, I have this error

/***/lottie-react-native/example/android/app/src/main/java/com/example/MainApplication.java:21: error: getUseDeveloperSupport() in <anonymous com.example.MainApplication$1> cannot override getUseDeveloperSupport() in ReactNativeHost
    protected boolean getUseDeveloperSupport() {
                      ^
  attempting to assign weaker access privileges; was public
1 error
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Changing "protected" to "public" corrects the issue.

@zjkhiyori
Copy link

change protected to public

@the-simian
Copy link

the-simian commented Feb 8, 2017

to be more specific:
in your MainApplication.java file,
public boolean getUseDeveloperSupport() { <-----

that got it building for me, at least

@lc3t35
Copy link
Author

lc3t35 commented Feb 8, 2017

@zhaojiakang917 @the-simian thanks but did you read the end of my post : "Changing "protected" to "public" corrects the issue" ;) Maybe I should have submitted a PR that would be more visible ;)

@lc3t35 lc3t35 closed this as completed Feb 8, 2017
@spikebrehm
Copy link
Contributor

Indeed, in a recent version the method changed from protected to public: facebook/react-native#11329

@vjcoder33
Copy link

Changing 'protected' to 'public' works. 💯

@lengocgiang
Copy link

You should remove node_modules and re-install again

@bkhurjawal
Copy link

Changing private to public saved my life. Thank you guys, I don't know java I am working in react native!

@yusuf987
Copy link

yusuf987 commented Apr 1, 2019

Changing 'protected' to 'public' works. but now my app is crashing ,
does someone has any idea ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants