Closed cjcheshire closed 5 years ago
@cjcheshire Thanks for using this module :) When I created it, I used another module that creates a basic iOS/Android (and I think windows) RN package. I didn't edit the android stuff at all, and don't remember if I even tested it or not.
I'll eventually get around to removing the native android code. Thank you for finding this! It'll be a few weeks probably (new baby in the house) before I can find the time to go through my code and fully make sure it's working properly again.
Totally understand that. Mines one tomorrow. Many congratulations and thanks again for the library :)
@KjellConnelly So is this fixed now?
Idk. I looked at your reference and saw I merged a pull request. But I believe the android code is still all there. Never got around to deleting it since it wasn’t an issue on my current apps.
Ok, so if i understand it correctly: It is eventually not fixed, but the code is not used by default on Android anyways?
Thanks for the quick response. I would like to use your lib and just want to understand, if it is working on both platforms :) Thank you for sharing it.
@buechner The native Android module is never used as it's just boilerplate. So when you run the app on Android, it should use only the javascript code. When you run it on iOS, most of the code runs through javascript, though there is one feature which requires native objective-c code.
So it should work for both. If you use this module, it is possible that you will get the same error as cjcheshire did when you run on Android. I don't get that error, but it's possible that it's because I'm using RN from a year and a half ago along with all the build tools. If you do get that error, try removing the Android stuff and it might be gone.
I'm not very fluent with Android or building these RN modules. Kind of just learn as I build. Which is why I'm not 100% sure on what needs to be removed. Possibly just deleting the entire Android folder would be enough. I'm not sure though as my current apps have a lot of other bugs to iron out on Android first before the apps will even run (as I've been focusing on the iOS side of things only for the past several weeks)
Thanks for writing this library!
I tried to use react-native link. Sadly our iOS isn't working right now so I successfully added it manually - all good :)
The weird one was native link did add references for android in the settings.gradle and build.gradle. These result in an error when building:
I noticed you said that android doesn't need to be manually added (so I removed and all good) so perhaps there is something that can be added to prevent these additions the link command adds?