question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Raise out android-jsc issues in current master

See original GitHub issue

Environment

React Native Environment Info: System: OS: macOS 10.14 CPU: x64 Intel® Core™ i5-5287U CPU @ 2.90GHz Memory: 4.55 GB / 16.00 GB Shell: 5.6.2 - /usr/local/bin/zsh Binaries: Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node Yarn: 1.12.1 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: Build Tools: 21.1.2, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 27.0.0, 27.0.1, 27.0.3, 28.0.0, 28.0.2, 28.0.3 API Levels: 17, 19, 22, 23, 25, 26, 27, 28 IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.1/10B61 - /usr/bin/xcodebuild

Description

There are two issues for current approach of android-jsc adoption. Related to #18754.

  1. The minSdkVersion is implicitly changed to API 21. Running on Android < 5 will have launch crash. Since this android-jsc is built by NDK APP_PLATFORM 21, there are some unresolved symbols for Android < 5 devices. E.g. sigemptyset

  2. Build break once published out as AAR format. Currently the dependency of android-jsc is added by this line. compile project(':android-jsc') For Android library as AAR, this dependency just tells the integrated application there is a ‘android-jsc’ package need to further resolved. Neither jar nor *.so will be packed into react-native AAR. User does not have android-jsc in their gradle projects, the dependency not found problem will cause build break. (Google plans to officially support fat aar in gradle plugin, which is fulfill this case to bundle all things in one AAR, but not ready yet.)

Reproducible Demo

  1. The minSdkVersion is implicitly changed to API 21. Simply do ./gradlew :RNTester:android:app:installDebug on Android 4.1 emulator and check adb log for missing symbols. E.g.
         AndroidRuntime  E  FATAL EXCEPTION: create_react_context
                         E  java.lang.ExceptionInInitializerError
                         E      at com.facebook.react.jscexecutor.JSCExecutorFactory.create(JSCExecutorFactory.java:25)
                         E      at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:944)
                         E      at java.lang.Thread.run(Thread.java:856)
                         E  Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so caused by: couldn't find DSO to load: libjsc.so caused by: Can
                            not load library: reloc_library[1306]:  1138 cannot locate 'sigemptyset'...
                         E      at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:703)
                         E      at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:564)
                         E      at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:500)
                         E      at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
                         E      at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:30)
                         E      at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:19)
                         E      ... 3 more
  1. For RNTester to use AAR dependency.
    1. Apply this patch. Assume your $HOME is /Users/foo.
    2. Build AAR and deployed at mavenLocal: ./gradlew :ReactAndroid:uploadArchives
    3. Build RNTester: ./gradlew :RNTester:android:app:assembleDebug
    4. This is the build error:
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':RNTester:android:app:debugCompileClasspath'.
> Could not find react-native:android-jsc:unspecified.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
gengjiawencommented, Nov 15, 2018

@Kudo Thanks. So the master branch actually won’t crash on pre-sdk-21 device. But I am intended to replace it with jsc-android-buildscript after https://github.com/react-community/jsc-android-buildscripts/pull/66 got merged.

cc @DanielZlotin @dulmandakh @kelset

0reactions
react-native-botcommented, Nov 21, 2018

If you are still encountering the issue described here, please open a new issue and make sure to fill out the Issue Template when doing so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error while running `react-native run-android`
First never use + to define the version of Libraries in Gradle, Try to give the latest version always.
Read more >
Code of Conduct for United States Judges
The Code of Conduct for United States Judges includes the ethical canons that apply to federal judges and provides guidance on their performance...
Read more >
Transform's input file does not exist [158753935] - Issue Tracker
Our project has two Android apps in the same project, but I am here trying to run lint only on one of the...
Read more >
Jsc Suggestion2014 Com Pdf (Download Only) - www.online.utsa.edu
recent and older literature in the field and raises important questions that will help to set the agenda for future research. He covers...
Read more >
Gym Master app not working? crashes or has problems? | 2022 ...
Complete guide to troubleshoot Gym Master app on iOS and Android devices. Solve all Gym Master app problems, errors, connection issues, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found