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

feat(android): populate home screen with AppRegistry entries #1127

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Sep 21, 2022

Description

Similar to #482, but for Android.

Resolves #189.

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows

Test plan

See test plan in #482.

Flipper crashes on startup with this change. I'm not sure why, but downgrading it to 0.105 resolves the issue. The SIGILL comes from the device trying to load different .so files on startup, but the app should load fine. Bump to 0.164 to make it go away.

This needs to be tested on:

  • 0.64 (no libjsi.so, should show blank screen)
  • 0.68 (has release libjsi.so)
  • 0.69 (has debug/release libjsi.so)
  • 0.69 + new arch (uses ndkBuild, libjsi.so already linked)
  • 0.70 (has debug/release libjsi.so)
  • 0.70 + new arch (uses cmake, libjsi.so already linked)

Note that for new arch, you will need to force resolve rn-cli to 9.x for autolinking.

device-2022-09-21-145225

Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested:

  • ❌ 0.64 (no libjsi.so)

    • fails on yarn android with error react-native-test-app/example/node_modules/react-native-test-app/android/app/src/main/java/com/microsoft/reacttestapp/react/TestAppReactNativeHost.kt: (181, 24): Unresolved reference: loadLibrary and
          Execution failed for task ':app:compileDebugKotlin'.
       > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
          > Compilation error. See log for more details
      
  • ✅ 0.68 (has release libjsi.so)

  • ✅🟡 0.69 (has debug/release libjsi.so) (but for some reason it just shows a blank page instead of the normal one with all the info, and just the version in the bottom right corner)

  • ❌ 0.69 + new arch (uses ndkBuild, libjsi.so already linked)

    • fails on yarn android with error react-native-test-app/example/android/app/build/generated/rncli/src/main/jni/Android-rncli.mk: No such file or directory and make: *** No rule to make target '/Users/lsciandra/Developer/oss/react-native-test-app/example/android/app/build/generated/rncli/src/main/jni/Android-rncli.mk'. Stop.
  • ✅ 0.70 (has debug/release libjsi.so)

  • ✅ 0.70 + new arch (uses cmake, libjsi.so already linked)

@tido64
Copy link
Member Author

tido64 commented Oct 4, 2022

@kelset:

For 0.64, we need a fix that landed on trunk. I've rebased now so it should work.

For 0.69: I forgot to mention that you need RN-CLI 9.x because 8 does not yet have autolinking. I also had to remove react-native-safe-area-context because the latest version dropped support for 0.69 and below when on new arch. Otherwise, I cannot repro the white screen you're seeing.

Screenshot_1664903958 Screenshot_1664906394

@kelset
Copy link
Contributor

kelset commented Oct 6, 2022

yeah, with the adjustments I managed to make it work for both 0.64 and both versions of 0.69 🎉

LGTM, when you want to open for review I can ✅

@tido64 tido64 marked this pull request as ready for review October 6, 2022 15:47
Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Base automatically changed from tido/android-qr-code-scanner to trunk October 6, 2022 16:21
@tido64 tido64 enabled auto-merge (squash) October 6, 2022 16:35
@tido64 tido64 merged commit 6b653c8 into trunk Oct 6, 2022
@tido64 tido64 deleted the tido/android-app-registry branch October 6, 2022 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android This affects Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Populate components list from AppRegistry if app.json is empty/missing
2 participants