I followed your steps faithfully based on the standard project just to make things simple, however I got this:
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* Where:
Build file '/media/Storage/easyship/android/build.gradle' line: 9
* What went wrong:
A problem occurred evaluating root project 'easyship'.
> Could not find method compile() for arguments [project ':react-native-fs'] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@501df9bd.
* 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: 1.629 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
Any idea on how to fix this?... your library is just what I need now and I find no replacement for it.
@onzag It looks like you might have misconfigured at least one of the files needed to reference the library. Android project settings are pretty horrible and very easy to get wrong, so triple check these files. Also make sure you have modified the correct build.gradle (there are two). My sample app might be a useful reference to compare to: https://github.com/cjdell/react-native-fs-test
You were right, it actually compiled, it seems that I picked the wrong build.gradle file.
Well I'll test it later and give you feedback in case something doesn't work, my fault for this one, you can close this issue :)
@cjdell Alright I found an issue where trying to write a file, which is more of a documentation issue, it's the writeFile options, I need to:
I would like that there's documentation regarding the options of the writeFile and other stuff, such as... how do I know if a file exists or not? why don't we have a fileExists element... or does stat does it? without throwing an error?
Most helpful comment
@onzag It looks like you might have misconfigured at least one of the files needed to reference the library. Android project settings are pretty horrible and very easy to get wrong, so triple check these files. Also make sure you have modified the correct
build.gradle(there are two). My sample app might be a useful reference to compare to: https://github.com/cjdell/react-native-fs-test