itinance / itinance/react-native-fs
Could not find method java.net.HttpURLConnection.getContentLengthLong
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
this error happens for me on android devices below 21 when downloading a file and makes the device crash.
here's the logcat:
```
I/dalvikvm( 2936): Could not find method java.net.HttpURLConnection.getContentLengthLong, referenced from method com.rnfs.Downloader.download
W/dalvikvm( 2936): VFY: unable to resolve virtual method 7098: Ljava/net/HttpURLConnection;.getContentLengthLong ()J
D/dalvikvm( 2936): VFY: replacing opcode 0x6e at 0x0041
W/dalvikvm( 2936): threadid=113: thread exiting with uncaught exception (group=0xa4d74b20)
E/AndroidRuntime( 2936): FATAL EXCEPTION: Thread-285
E/AndroidRuntime( 2936): Process: com.emji.android, PID: 2936
E/AndroidRuntime( 2936): java.lang.NoSuchMethodError: java.net.HttpURLConnection.getContentLengthLong
E/AndroidRuntime( 2936): at com.rnfs.Downloader.download(Downloader.java:67)
E/AndroidRuntime( 2936): at com.rnfs.Downloader.access$100(Downloader.java:22)
E/AndroidRuntime( 2936): at com.rnfs.Downloader$1.run(Downloader.java:34)
E/AndroidRuntime( 2936): at java.lang.Thread.run(Thread.java:841)
W/ActivityManager( 594): Force finishing activity com.emji.android/.MainActivity
```
does anyone have a solution for this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.