React-native-image-crop-picker: Unable to override or implement

Created on 24 Aug 2016  路  20Comments  路  Source: ivpusic/react-native-image-crop-picker

I tried adding in the package, followed the steps for Android, but got the following error when trying to build it on my device:

"react-native-image-crop-picker/android/src/main/java/com/reactnative/picker/PickerModule.java:310: error: method does not override or implement a method from a supertype"

":react-native-image-crop-picker:compileReleaseJavaWithJavac FAILED"

Any thoughts?

Most helpful comment

The error is gone after I ran react-native upgrade and overwrite build.gradle files.

All 20 comments

probably you are not using latest RN? onNewIntent method is recently added, and this module depends on it

Actually I am using RN 0.31.0 and React 15.2.1. So, it appears that it would be something else. I will try uninstalling and reinstalling.

hmm...okey...let me know if you find out something or you need help

Still getting the same error.

This is where the problem comes from"

@Override
public void onNewIntent(Intent intent) {
}

If I remove that function, it gets closer to building. However, I then get this error if I remove that function

"Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 18"

Thoughts?

first step is to put minSdkVersion to 18 in your build gradle file

I upgraded the minSdkVersion to 18. It still failed to build. So I removed:

@Override
public void onNewIntent(Intent intent) {
}

Once I removed that it was able to build.

hm, can you please go to node_modules/react-native and check package.json there. Are you 100% percent sure you are using rn0.31?

Yep, double checked. I am using RN 0.31.0.

Dafuq, could it be that you didnt somehow sync android project with rn0.31 code. example: you started with older version of RN and after upgrading, gradle didn't pull upgrade?

Will it work with RN 0.32.0? If you think it will, I will upgrade to see if gradle updates this time.

this change is introduced in 0.30 https://github.com/facebook/react-native/releases/tag/v0.30.0, so it should work already for you.

+1
I just upgraded react-native from 0.26 to 0.32 and image-crop-picker from 0.4.2 to 0.7.0 and currently facing the same error. Anybody figured it out yet?

The error is gone after I ran react-native upgrade and overwrite build.gradle files.

@brennens did you fixed it?

@ivpusic I'm also getting the below:

/Users/jeremyhindle/code/hsapp/node_modules/react-native-image-crop-picker/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java
Error:(310, 5) error: method does not override or implement a method from a supertype
:react-native-image-crop-picker:compileReleaseJavaWithJavac FAILED
Error:Execution failed for task ':react-native-image-crop-picker:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Relevant part of package.json below:

    "react": "15.2.1",
    "react-native": "^0.31.0",
    "react-native-image-crop-picker": "^0.7.0",

@ivpusic
doing:
react-native upgrade (very carefully)
I got to a working build.

@brennens will close issue. Please take a look at above comments for a solution.

@Mentioum did you find any specific difference while doing the upgrade. I'm looking at the diffs but for me it is just removing my other dependencies...

hi Guys,
i am still facing a issue when I take the picture and press OK button the app get restarted.in all mobiles like redmi note4 and moto g2. am trying to resolve from one day. am not able to solve this can u please help me thanks in advance
i update the version react-native-image-picker from 0.26.3 to 0.22.9. app getting like "unfortunately app has stopped" showing pop up like this.

config

"react-native": "^0.42.3",
"react-native-image-picker": "0.22.9"
db is firebase

options are

var options = {
title: 'Select Avatar',
quality: 0.6,
storageOptions: {
skipBackup: true,
path: 'images'
}
};

@ivpusic I also have same issue. :disappointed:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Phenek picture Phenek  路  3Comments

pavsidhu picture pavsidhu  路  3Comments

aterribili picture aterribili  路  3Comments

xuchao321 picture xuchao321  路  3Comments

cwRichardKim picture cwRichardKim  路  3Comments