Skip to content

Fixed ContactWrapper is not abstract and does not override abstract method #5

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

deepmehtait
Copy link

Having issue of ContactWrapper is not abstract and does not override abstract method when imported into react-native project.
screen shot 2016-09-15 at 8 54 15 pm
Also fixed some imports in the file.
Updated README.md with proper settings.gradle and examples

@decoderzhub
Copy link

The changes you made didn't work for me I'm still getting the abstract error message

@deepmehtait
Copy link
Author

@dooleydragon Did you did npm install again ?

@decoderzhub
Copy link

I just did, I'll give it another try and let you know.

@decoderzhub
Copy link

The changes that you made aren't there after the npm install. I'm going to mess around with it for a little bit and see if I can fix it.

@decoderzhub
Copy link

decoderzhub commented Oct 2, 2016

So I npm installed react-native-contacts-wrapper:
cmd

here is the location of where it saved:
npm saved

after that I copied it to my reactive-native app node modules:
copied to nodemodules

Then I did the manual install for RN .29 and above I'm currently running RN .33:
manual install

Add Build dependencies:
build dependencies

Add Package to MainApplication.java:
add package

Checked my AndroidManifest.xml:
androidmanifest

Then I ran the build command from the command prompt: react-native build-android
buildfailed

as you can see I'm still getting error:

ContactsWrapper.java:31: error: ContactsWrapper is not abstract and does not override abstract method onActivityResult(Activity,int,int,Intent) in ActivityEventListener
public class ContactsWrapper extends ReactContextBaseJavaModule implements ActivityEventListener {

And

ContactsWrapper.java:80: error: method does not override or implement a method from a supertype
    @Override
    ^
2 errors
:react-native-contacts-wrapper:compileReleaseJavaWithJavac   

I'm probably doing this all wrong but if I comment out the dependency then I can compile and it will run but when I click on the Open Contacts button I get:
screenshot_1475439051

so I think I'm on the right track just missing something???

@decoderzhub
Copy link

I was able to get it to compile I had to changed the ContactsWrapper.java in the Node Modules folder and after that it compiled there was another app:dexdebug error... that's because there was a build folder in the react-native-contacts-wrapper\android\app\build had to delete that then it compiled. Now the application closes everytime I click the button but it does display the contact list.

@deepmehtait
Copy link
Author

@dooleydragon : if you see this line, what basically I did was do a fresh install of the package. Include the package via npm install
Then include this contact wrapper into project. Open Android Studio and do necessary installation. Then do a gradle build. It will fail. Go to mention file above. Click on bubble to fix the error, import methods. Replace onActivity with newly imported method and it will fix the issue. But if you do again npm install you need to go and manually fix all the above steps. hope this helps. Reason for this PR was it was using final keyword and other @override methods were not implemented.

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

Successfully merging this pull request may close these issues.

2 participants