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

[0.10.5] is not abstract and does not override abstract method

Open jeniasaigak opened this issue 7 years ago • 7 comments

Version 0.10.5 react-native ^0.29.2

while running 'react-native run-android':

... /home/zmefz/Documents/react-native/comped/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java:46: error: <anonymous com.RNFetchBlob.RNFetchBlob$1> is not abstract and does not override abstract method onActivityResult(int,int,Intent) in ActivityEventListener reactContext.addActivityEventListener(new ActivityEventListener() { ^ /home/zmefz/Documents/react-native/comped/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java:47: error: method does not override or implement a method from a supertype @Override ^ /home/zmefz/Documents/react-native/comped/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java:56: error: method does not override or implement a method from a supertype @Override ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 3 errors :react-native-fetch-blob:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native-fetch-blob:compileReleaseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.951 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html

jeniasaigak avatar May 25 '17 12:05 jeniasaigak

I'm getting this as well, RN 40.0, RN fetch blob 0.10.5

Djakninn avatar Jun 07 '17 10:06 Djakninn

Getting the same issue with RN 0.45.2 blob 0.10.5

ghost avatar Jun 12 '17 10:06 ghost

Same issue with RN 0.47.1 and rn-fetch-blob 0.10.5

nicotroia avatar Aug 08 '17 07:08 nicotroia

Okay, I think this can be fixed by simply adding the following before this line

super.onActivityResult(requestCode, resultCode, data);

wkh237 avatar Aug 08 '17 07:08 wkh237

@wkh237 hm, it didn't work for me. It's giving me the error: "can't resolve method: onActivityResult(int,int,android.content.Intent)"

giisethegoose avatar Mar 22 '18 04:03 giisethegoose

I am having the same issue. After applying the fix referenced here: https://github.com/wkh237/react-native-fetch-blob/issues/481#issuecomment-358820091

As well as the fix referenced above from @wkh237

Here are the errors I am seeing from Android studio 3.1.1:

android/src/main/java/com/RNFetchBlob/RNFetchBlob.java - 1 error
error: cannot find symbol method onActivityResult(int,int,Intent)

android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java - 2 errors
error: method does not override or implement a method from a supertype
error: incompatible types: <anonymous okhttp3.Callback> cannot be converted to expolib_v1.okhttp3.Callback

bmangus avatar Jun 14 '18 17:06 bmangus

@bmangus don't forget to also replace new okhttp3 with new expolib_v1.okhttp3

EOdOW avatar Nov 15 '18 03:11 EOdOW