Add Development information to readme#378
Conversation
|
|
||
| #### iOS and Android Simulators (with Hot Reload) | ||
|
|
||
| Make sure to install Corvoda's required dependencies for [iOS](https://cordova.apache.org/docs/en/11.x/guide/platforms/ios/index.html)/[Android](https://cordova.apache.org/docs/en/11.x/guide/platforms/android/) before running the following commands. |
There was a problem hiding this comment.
Hmm, could totally be incorrect, but I don't believe you should have to install these manually. Running npm install should be sufficient to install all the necessary dependencies, did you run into issues using that method?
There was a problem hiding this comment.
npm install installed all of the dependencies I needed except for the Android SDK, which I installed with Android Studio.
I think having these links could be convenient in the event that someone is struggling with the dependencies, so they could read about what they are missing, and I will mention Android Studio explicitly.
Do you think I should change the phrasing as well?
There was a problem hiding this comment.
Ahhh yeah okay, that makes sense! I think maybe changing the phrasing to something like "if you're having issues running the iOS/Android simulators, you may have to install these dependencies"
There was a problem hiding this comment.
I also encountered issues trying to run the iOS and Android servers locally, so I think these extra bits of documentation will be helpful! (That said, I haven't fully tried it yet)
P.s. in case the original wording is kept in some form, there's a typo: Corvoda -> Cordova
|
|
||
| # If any errors occur, set the following environment variables and try again, or run the app using Android Studio | ||
| export JAVA_HOME=/path/to/android-studio/jbr | ||
| export ANDROID_SDK_ROOT=/path/to/Android/Sdk |
There was a problem hiding this comment.
This is a super helpful addition, thanks! 😊 Would you mind changing these to this syntax? I just call it "insert here" syntax haha, probably has a technical term.
Syntax:
export JAVA_HOME=<PATH_TO_JAVA_HOME>
And the same idea for the syntax of ANDROID_SDK_ROOT variable.
It'd also be nice to have some info on how to get the location for Java home easily, maybe something like:
Windows: echo %JAVA_HOME%
Mac/Linux: echo $JAVA_HOME
And for ANDROID_SDK_ROOT, that's typically in these locations:
Mac: /Users/<USERNAME>/Library/Android/sdk
Windows: C:\Program Files\Android\sdk OR C:/Users/<USERNAME>/AppData/Local/Android/Sdk
There was a problem hiding this comment.
I don't currently have a ~/Library/Android directory - would installing the Cordova dependencies fix that?
There was a problem hiding this comment.
I don't currently have a ~/Library/Android directory - would installing the Cordova dependencies fix that?
The ~/Library/Android path is referencing where my Android SDK is installed, it may be different for your device. I don't believe the Cordova dependencies should affect that. Instructions on how to install Android SDK can be found here.
|
|
||
| # If any errors occur, set the following environment variables and try again, or run the app using Android Studio | ||
| export JAVA_HOME=/path/to/android-studio/jbr | ||
| export ANDROID_SDK_ROOT=/path/to/Android/Sdk |
There was a problem hiding this comment.
Not necessarily in scope for this PR, but I also encountered the following error when trying to run the Android server
✖ Creating capacitor.config.json in android/app/src/main/assets - failed!
✖ copy android - failed!
[error] Error: ENOENT: no such file or directory, open
'/Users/ynda/code/github.com/salemlf/hakubun/android/app/src/main/assets/capacitor.config.json'
Creating the assets directory manually before re-running fixed that error, then I got onto the next error, which your suggestion would presumably fix
[error] native-run failed with error
ERR_SDK_NOT_FOUND: No valid Android SDK root found.
There was a problem hiding this comment.
I also ran into this issue, so I added a mkdir inside the android-live-reload script in package.json, which fixed the issue for me.
Not sure if the file is meant to have compatibility with windows though, if so, I'll need to think of something else.
|
|
||
| # If any errors occur, set the following environment variables and try again, or run the app using Android Studio | ||
| export JAVA_HOME=/path/to/android-studio/jbr | ||
| export ANDROID_SDK_ROOT=/path/to/Android/Sdk |
There was a problem hiding this comment.
I don't currently have a ~/Library/Android directory - would installing the Cordova dependencies fix that?
|
|
||
| #### iOS and Android Simulators (with Hot Reload) | ||
|
|
||
| Make sure to install Corvoda's required dependencies for [iOS](https://cordova.apache.org/docs/en/11.x/guide/platforms/ios/index.html)/[Android](https://cordova.apache.org/docs/en/11.x/guide/platforms/android/) before running the following commands. |
There was a problem hiding this comment.
I also encountered issues trying to run the iOS and Android servers locally, so I think these extra bits of documentation will be helpful! (That said, I haven't fully tried it yet)
P.s. in case the original wording is kept in some form, there's a typo: Corvoda -> Cordova
|
|
||
| #### iOS and Android Simulators (with Hot Reload) | ||
|
|
||
| Make sure to install Corvoda's required dependencies for [iOS](https://cordova.apache.org/docs/en/11.x/guide/platforms/ios/index.html)/[Android](https://cordova.apache.org/docs/en/11.x/guide/platforms/android/) before running the following commands. |
There was a problem hiding this comment.
Is there a reason for linking to the v11 docs rather than v12 or whatever version the app currently uses? I'm not familiar with it, but I can't see any reference to a version in the codebase except 10.1.1
Also, you can drop the index.html on the iOS link for consistency 😊
There was a problem hiding this comment.
That's a good point, it should really link to the 10.x version instead since that's what's referenced in the variables file you mentioned. Dropping the "index.html" ending makes sense, yeah!
c73d0eb to
ab16fb0
Compare
ab16fb0 to
d5bc861
Compare
Hello!
Hakubun has inspired me to finally start contributing to open-source projects, and try out a new field of programming.
In this PR I add a little bit of information to the development section in the README, that would have saved me time starting out, and which will hopefully make it easier for new contributors to join.
Also, I saw that you have a stale branch that adds a bit more information about the app's architecture to the README, and I think it would be great if you also merged that branch.