-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
179/AndroidContributionGuide #200
Merged
mercillo
merged 5 commits into
player-ui:main
from
mercillo:179/AndroidContributionGuide
Nov 6, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d24daab
redone from main, bazel sync was stuck
ef16c21
updated babel message
88de41a
Merge branch 'main' into 179/AndroidContributionGuide
mercillo e26f3e7
Merge branch 'main' into 179/AndroidContributionGuide
mercillo 5f3404e
Merge branch 'main' into 179/AndroidContributionGuide
mercillo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,67 @@ | ||
# Android Demo App | ||
|
||
# Local Development with Android Studio | ||
|
||
This will be a getting started guide on contributing to Player on Android. | ||
|
||
It's been tested on Andriod Studio Chipmunk(2021.2.1) and Android Studio Giraffe(2022.3.1). Although other versions may work as well. | ||
|
||
Assuming you have read the [requirements on the root contributing guide](https://github.com/player-ui/player/blob/main/CONTRIBUTING.md). | ||
|
||
1. Once you have Android Studio installed, you will need to go to tools->SDK Manager->SDK Platforms. | ||
1. Make sure you have **only** the following SDK installed: Android API 32. | ||
*If you are using Android Giraffe, you may need to click on show package details and it will be under Android12L. (Android SDK Platrform 32)* | ||
2. The next step will be to make sure you have the right SDK Build tools and NDK. Click on the SDK Tools tab and make sure you have the following clicked: | ||
1. 30.0.3 | ||
2. 21.4.7075529 | ||
3. You will now need to create an android device for emulation. Click on Device Manager and do create new device. | ||
1. You will need to download an Sv2. | ||
2. You should now be able to click the play button to start up your device. | ||
4. You should now be able to run `bazel build //android/demo` | ||
5. The following are different ways to run the apk on your device. If the following methods do not work, we can manually drop the APK that gets generated from the build command to the emulated android device. | ||
|
||
``` | ||
bazel run //android:demo | ||
``` | ||
|
||
``` | ||
bazel mobile-install //android/demo | ||
``` | ||
|
||
If those command do not run, you can find the apk in `bazelbin/android/demo/install.runfiles/player/android/demo/demo.apk` and drag this apk onto the emulated device. This will install it. ( you may need to swipe on the device to see the application) | ||
|
||
|
||
|
||
## Troubleshooting Guide | ||
|
||
|
||
|
||
### 1. If you are seeing issues around Toolchain and sdk | ||
Check your SDK and NDK versions in SDK Manager in Android Studio. As well as your `ANDROID_HOME` and `ANDROID_NDK_HOME` in your bash or zsh profiles to make sure they are properly set. | ||
|
||
|
||
### 2. If you are seeing Errors around babel: | ||
``` | ||
could not find dependency @babel/helper-string-parser of @babel.plugin-transform-react-jsx/noode_modules/@babel/types | ||
Error: Analysis of target '//android/demo:demo' failed; build aborted. | ||
``` | ||
Make sure you have done a `bundle install` | ||
|
||
|
||
|
||
### 3. Error Message : | ||
``` | ||
ResourceProcessorBusyBox failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/ResourceProcessorBusyBox --tool LINK_STATIC_LIBRARY -- --aapt2 ... (remaining 17 arguments skipped) | ||
``` | ||
**Possible Solution:** Check your SDK and NDK versions in SDK Manager in Android Studio. As well as your `ANDROID_HOME` and `ANDROID_NDK_HOME` in your bash or zsh profiles to make sure they are properly set. | ||
|
||
You can also do `ls $ANDROID_HOME/platforms` and make sure that there are no versions higher than 30. | ||
|
||
|
||
|
||
### 4. Mvn Error Message: | ||
``` | ||
//jvm/j2v8:j2v8-android depends on @android_j2v8//aar:aar in repository @android_j2v8 which failed to fetch. no such package '@android_j2v8//aar': android_j2v8 requires mvn as a dependency. Please check your PATH. | ||
``` | ||
Check to make sure `mvn` is installed. | ||
`brew install maven` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this right? why does the iOS ruby dependencies matter for babel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was when they got an error of
could not find dependency
@babel/helper-string-parser
of@babel.plugin-transform-react-jsx/noode_modules/@babel/types
Error: Analysis of target '//android/demo:demo' failed; build aborted.
they ended up not doing a bundle install haha, let me add this error to specify which error