Skip to content
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

Mobile: Fix issues with development environment #1780

Closed
wants to merge 3 commits into from

Conversation

xuhcc
Copy link
Contributor

@xuhcc xuhcc commented Aug 1, 2019

  1. https://github.com/mikehardy/jetifier

Without this package installed, react-native run-android command fails:

> Task :@react-native-community_slider:compileDebugJavaWithJavac FAILED
/home/xuhcc/Documents/coding/joplin/ReactNativeClient/node_modules/@react-native-community/slider/android/src/main/java/com/reactnativecommunity/slider/ReactSlider.java:11: error: package android.support.v7.widget does not exist
import android.support.v7.widget.AppCompatSeekBar;
                                ^
/home/xuhcc/Documents/coding/joplin/ReactNativeClient/node_modules/@react-native-community/slider/android/src/main/java/com/reactnativecommunity/slider/ReactSlider.java:23: error: cannot find symbol
public class ReactSlider extends AppCompatSeekBar {
  1. https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows/44476757

Added note about this bug to BUILD.md, because it seems to be a common problem.

* Install missing jetifier dependency
* Add note about run-android bug to BUILD.md
@tessus
Copy link
Collaborator

tessus commented Aug 1, 2019

Added note about this bug to BUILD.md, because it seems to be a common problem.

The problem is that the solution I used in the discussion here is not a solution. The command: react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res creates a release build, which is not wanted during development.

We need to find a real solution to the issue, but even though I followed every single advice and even though my server is running on the correct port, I still get the "unable to load from script" error message.

@xuhcc
Copy link
Contributor Author

xuhcc commented Aug 1, 2019

Running react-native bundle --platform android ... is inconvenient, but it makes development possible, so I think we can add a note to help new contributors.

I suspect that it is indeed a bug in React Native CLI.

@tessus
Copy link
Collaborator

tessus commented Aug 1, 2019

Apparently @laurent22 does not have this problem, so maybe it's just my dev env, which I do not understand either, because it worked on my other MacBook (which I don't have anymore) and I setup both the same way. Very strange.

In any case, I'm more than ok to update the doc, but it's not my decision. Let's wait for Laurent's comment.

@xuhcc
Copy link
Contributor Author

xuhcc commented Aug 19, 2019

Fix for [1] was added in ba5c636, so only BUILD.md change remains here.

@laurent22
Copy link
Owner

Thanks for the PR but indeed the main part has already been fixed in another commit. The Readme update is not specific to Joplin but to React Native development in general so I'd rather not add it.

@laurent22 laurent22 closed this Aug 29, 2019
@xuhcc xuhcc deleted the jetifier branch August 29, 2019 17:41
tessus added a commit to tessus/joplin that referenced this pull request Dec 5, 2020
```
Release Notes 8.8.4

    Re-align gantt chart dateFormat table with spaces (laurent22#1764) @AloisMahdal
    Docs/update edit this page (laurent22#1774) @sy-records
    Fixed typo in the docs (laurent22#1780) @manicki
    Move babel-eslint to devDependencies (laurent22#1772) @glensc
    Add Doscy to list of integrations (laurent22#1784) @gwatts
    Changed regex for multi-line state notes (laurent22#1773) @tomatoman25
    Add different id generators (laurent22#1787) @julianbei
    Bump highlight.js from 9.18.1 to 9.18.5 (laurent22#1789) @dependabot
    Fixed markdown error in Relationship Syntax (laurent22#1796) @kciter
    remove classDiagram duplicate options (laurent22#1786) @JiChao99
    Update copyright years (laurent22#1805) @BastianZim

🐛 Bug Fixes

    Add sans-serif to default font settings (laurent22#1776) @GDFaber
    ignore build files in dist folder (laurent22#1777) @GDFaber
    Narrow down console logging when flowchart subgraphs are added (laurent22#1782) @GDFaber
    Apply style settings to subgraphs in "flowchart" diagrams (laurent22#1781) @GDFaber

Release Notes 8.8.3

    Fix styling of links for new beta flowchart (laurent22#1730) @knsv
    Fix typo in pie.md (laurent22#1705) @hwine
    Fixing broken links and misspellings (laurent22#1727) @deining
    Fixed empty code examples (laurent22#1729) @Eraledm
    README: use stateDiagram-v2 (laurent22#1728) @alexislefebvre
    laurent22#1724 Adding fontawesome to edge labels (laurent22#1731) @knsv
    Fix broken links in gantt.md (laurent22#1703) @wontonst
    Replace fregante/setup-git-token with setup-git-user (laurent22#1735) @fregante
    Updated docs (laurent22#1739) @BastianZim
    1740 nested subgraps directions (laurent22#1741) @knsv
    Switching to Docsify and adding search (laurent22#1746) @NeilCuzon
    Fixed bad tertiary operator (laurent22#1743) @lishid
    fix broken links in README (laurent22#1749) @levlas

Release Notes 8.8.2

    1704 Revert to original behavior of nodes and subgraphs (laurent22#1709) @knsv

    There is some ambiguity about what subgraph a node belongs to when it appears in several subgraphs. Should it stick to the first subgraph it appears in, or should the last subgraph it gets added to be the one it belongs to. With this change the original behavior is retained.
```
laurent22 pushed a commit that referenced this pull request Dec 9, 2020
```
Release Notes 8.8.4

    Re-align gantt chart dateFormat table with spaces (#1764) @AloisMahdal
    Docs/update edit this page (#1774) @sy-records
    Fixed typo in the docs (#1780) @manicki
    Move babel-eslint to devDependencies (#1772) @glensc
    Add Doscy to list of integrations (#1784) @gwatts
    Changed regex for multi-line state notes (#1773) @tomatoman25
    Add different id generators (#1787) @julianbei
    Bump highlight.js from 9.18.1 to 9.18.5 (#1789) @dependabot
    Fixed markdown error in Relationship Syntax (#1796) @kciter
    remove classDiagram duplicate options (#1786) @JiChao99
    Update copyright years (#1805) @BastianZim

🐛 Bug Fixes

    Add sans-serif to default font settings (#1776) @GDFaber
    ignore build files in dist folder (#1777) @GDFaber
    Narrow down console logging when flowchart subgraphs are added (#1782) @GDFaber
    Apply style settings to subgraphs in "flowchart" diagrams (#1781) @GDFaber

Release Notes 8.8.3

    Fix styling of links for new beta flowchart (#1730) @knsv
    Fix typo in pie.md (#1705) @hwine
    Fixing broken links and misspellings (#1727) @deining
    Fixed empty code examples (#1729) @Eraledm
    README: use stateDiagram-v2 (#1728) @alexislefebvre
    #1724 Adding fontawesome to edge labels (#1731) @knsv
    Fix broken links in gantt.md (#1703) @wontonst
    Replace fregante/setup-git-token with setup-git-user (#1735) @fregante
    Updated docs (#1739) @BastianZim
    1740 nested subgraps directions (#1741) @knsv
    Switching to Docsify and adding search (#1746) @NeilCuzon
    Fixed bad tertiary operator (#1743) @lishid
    fix broken links in README (#1749) @levlas

Release Notes 8.8.2

    1704 Revert to original behavior of nodes and subgraphs (#1709) @knsv

    There is some ambiguity about what subgraph a node belongs to when it appears in several subgraphs. Should it stick to the first subgraph it appears in, or should the last subgraph it gets added to be the one it belongs to. With this change the original behavior is retained.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants