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

cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~KG2XHm4tjtHU2n-uUaHmAw==/com.awesomeproject-K6QII1ku6H_ZWb6oUOEsxw==/lib/arm64/libreact_render_telemetry.so" #41238

Closed
woshi82 opened this issue Oct 30, 2023 · 5 comments
Labels
Platform: Android Android applications. Platform: Windows Building on Windows. Resolution: Answered When the issue is resolved with a simple answer Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@woshi82
Copy link

woshi82 commented Oct 30, 2023

Description

I want to verify anther problem,so I created Just a simple demo project by npx react-native@0.72.4 init AwesomeProject.
I have not even add other code ,just turn on newArchEnabled=true
But, it got crash

 package info: com.awesomeproject
2023-10-30 19:45:00.788  4630-26579 oiface                  oiface                               E  packageSwitch pkg com.awesomeproject, enter
2023-10-30 19:45:00.789  4630-26579 oiface                  oiface                               E  current package is com.awesomeproject and pid is 5109
2023-10-30 19:45:00.924  5109-5109  Perf                    com.awesomeproject                   I  Connecting to perf service.
2023-10-30 19:45:00.928  5109-5109  NetworkSecurityConfig   com.awesomeproject                   D  No Network Security Config specified, using platform default
2023-10-30 19:45:00.928  5109-5109  NetworkSecurityConfig   com.awesomeproject                   D  No Network Security Config specified, using platform default
2023-10-30 19:45:00.936  5109-5109  SoLoader                com.awesomeproject                   V  Init System Loader delegate
2023-10-30 19:45:00.938  5109-5109  linker                  com.awesomeproject                   W  Warning: "/data/app/~~LFQLsSvNo3clw-U5J6fJ5A==/com.awesomeproject-YoGrGryyd5o73ouJ4uslSw==/lib/arm64/libruntimeexecutor.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
2023-10-30 19:45:00.950  5109-5109  AndroidRuntime          com.awesomeproject                   D  Shutting down VM
2023-10-30 19:45:00.951  5109-5109  AndroidRuntime          com.awesomeproject                   E  FATAL EXCEPTION: main
                                                                                                    Process: com.awesomeproject, PID: 5109
                                                                                                    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~LFQLsSvNo3clw-U5J6fJ5A==/com.awesomeproject-YoGrGryyd5o73ouJ4uslSw==/lib/arm64/libreact_render_telemetry.so"...
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
                                                                                                    	at java.lang.System.loadLibrary(System.java:1664)
                                                                                                    	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
                                                                                                    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
                                                                                                    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
                                                                                                    	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(DefaultNewArchitectureEntryPoint.kt:40)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load$default(DefaultNewArchitectureEntryPoint.kt:27)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(Unknown Source:3)
                                                                                                    	at com.awesomeproject.MainApplication.onCreate(MainApplication.java:58)
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7273)
                                                                                                    	at android.app.ActivityThread.access$1600(ActivityThread.java:301)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2159)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loop(Looper.java:263)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8278)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
2023-10-30 19:45:00.966  5109-5109  Process                 com.awesomeproject                   I  Sending signal. PID: 5109 SIG: 9
2023-10-30 19:45:01.000 17154-314   RemoteGuar...ityMonitor com.coloros.remoteguardservice       E  onProcessDied com.awesomeproject pid = 5109 uid = 10215
2023-10-30 19:45:01.580  3739-6370  OppoGuardElf            com.coloros.persist.system           E  AbnormalAppMonitor_service: App Upgrade: F com.awesomeproject
2023-10-30 19:56:27.479 31728-31809 IcingInternalCorpora    com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.479 31728-5563  GmscoreIpa              com.google.android.gms               E  Could not get app info for com.awesomeproject [CONTEXT service_id=255 ]
                                                                                                    android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
                                                                                                    	at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:460)
                                                                                                    	at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:449)
                                                                                                    	at com.google.android.gms.ipa.appsindexer.IpaPackageBroadcastIntentOperation.onHandleIntent(:com.google.android.gms@234212037@23.42.12 (150400-574052649):119)
                                                                                                    	at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms@234212037@23.42.12 (150400-574052649):2)
                                                                                                    	at aftk.onHandleIntent(:com.google.android.gms@234212037@23.42.12 (150400-574052649):10)
                                                                                                    	at nby.run(:com.google.android.gms@234212037@23.42.12 (150400-574052649):70)
                                                                                                    	at nbx.run(:com.google.android.gms@234212037@23.42.12 (150400-574052649):152)
                                                                                                    	at dfmr.run(:com.google.android.gms@234212037@23.42.12 (150400-574052649):13)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                                                                                                    	at java.lang.Thread.run(Thread.java:923)
2023-10-30 19:56:27.717 31728-31764 Icing                   com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.738 31728-5574  GmscoreIpa              com.google.android.gms               E  Could not get app info for com.awesomeproject [CONTEXT service_id=255 ]
                                                                                                    android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
                                                                                                    	at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:460)
                                                                                                    	at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:449)
                                                                                                    	at com.google.android.gms.ipa.appsindexer.IpaPackageBroadcastIntentOperation.onHandleIntent(:com.google.android.gms@234212037@23.42.12 (150400-574052649):119)
                                                                                                    	at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms@234212037@23.42.12 (150400-574052649):2)
                                                                                                    	at aftk.onHandleIntent(:com.google.android.gms@234212037@23.42.12 (150400-574052649):10)
                                                                                                    	at nby.run(:com.google.android.gms@234212037@23.42.12 (150400-574052649):70)
                                                                                                    	at nbx.run(:com.google.android.gms@234212037@23.42.12 (150400-574052649):152)
                                                                                                    	at dfmr.run(:com.google.android.gms@234212037@23.42.12 (150400-574052649):13)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
                                                                                                    	at java.lang.Thread.run(Thread.java:923)
2023-10-30 19:56:27.753 31728-31764 Icing                   com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.770 31728-31811 Icing                   com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.770 31728-31811 Icing                   com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.771 31728-31809 IcingInternalCorpora    com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.772 31728-31811 Icing                   com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.773 31728-31811 Icing                   com.google.android.gms               E  Could not get app info for com.awesomeproject: android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
2023-10-30 19:56:27.791  1449-4675  BackupTransportManager  system_server                        E  Trying to register transports from package not found com.awesomeproject
2023-10-30 19:56:27.831  1449-1856  MidiService             system_server                        E  handlePackageUpdate could not find package com.awesomeproject
                                                                                                    android.content.pm.PackageManager$NameNotFoundException: com.awesomeproject
                                                                                                    	at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:237)
                                                                                                    	at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:204)
                                                                                                    	at com.android.server.midi.MidiService.addPackageDeviceServers(MidiService.java:846)
                                                                                                    	at com.android.server.midi.MidiService.access$100(MidiService.java:62)
                                                                                                    	at com.android.server.midi.MidiService$1.onPackageModified(MidiService.java:121)
                                                                                                    	at com.android.internal.content.PackageMonitor.onReceive(PackageMonitor.java:397)
                                                                                                    	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1688)
                                                                                                    	at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:263)
                                                                                                    	at android.os.HandlerThread.run(HandlerThread.java:67)
2023-10-30 19:56:28.160  1449-1693  PackageManager          system_server                        E  failed to find package com.awesomeproject
2023-10-30 19:56:28.160  1449-1693  OverlayManager          system_server                        E  Failed to change enabled overlays for com.awesomeproject user 0
2023-10-30 19:56:28.160  1449-1693  OplusLangu...bleManager system_server                        E  failed to find package com.awesomeproject
2023-10-30 19:56:28.160  1449-1693  OplusLanguageManager    system_server                        E  Failed to change language enabled overlays for [/my_heytap/overlay/GmsConfigOverlayCommon/GmsConfigOverlayCommon.apk, /product/overlay/GoogleExtServicesConfigOverlay.apk, /product/overlay/GooglePermissionControllerFrameworkOverlay.apk, /product/overlay/ModuleMetadataGoogleOverlay.apk, /product/overlay/FrameworksResCommon.apk, /product/overlay/FrameworksResCommonQva.apk, /my_product/overlay/framework_res_overlay_Network.kona.apk, /vendor/overlay/FrameworksResTarget.apk, /my_product/overlay/android_framework_res_overlay.display.product.20135.apk] package com.awesomeproject user 0
2023-10-30 19:56:50.615  1449-1931  PackageManager          system_server                        E  Fix up user restrict data of pkg: com.awesomeproject
2023-10-30 19:56:52.483  6540-6540  oplus.andr...actoryImpl com.awesomeproject                   I  get feature:IOplusScreenModeFeature
2023-10-30 19:56:52.483  6540-6540  oplus.andr...actoryImpl com.awesomeproject                   I  getOplusScreenModeFeature
2023-10-30 19:56:52.512  1449-25469 OppoThermalStats        system_server                        E  Error getting package info: com.awesomeproject
2023-10-30 19:56:52.638  6540-6540  Perf                    com.awesomeproject                   I  Connecting to perf service.
2023-10-30 19:56:52.642  6540-6540  NetworkSecurityConfig   com.awesomeproject                   D  No Network Security Config specified, using platform default
2023-10-30 19:56:52.642  6540-6540  NetworkSecurityConfig   com.awesomeproject                   D  No Network Security Config specified, using platform default
2023-10-30 19:56:52.650  6540-6540  SoLoader                com.awesomeproject                   V  Init System Loader delegate
2023-10-30 19:56:52.653  6540-6540  linker                  com.awesomeproject                   W  Warning: "/data/app/~~KG2XHm4tjtHU2n-uUaHmAw==/com.awesomeproject-K6QII1ku6H_ZWb6oUOEsxw==/lib/arm64/libruntimeexecutor.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
2023-10-30 19:56:52.665  6540-6540  AndroidRuntime          com.awesomeproject                   D  Shutting down VM
2023-10-30 19:56:52.666  6540-6540  AndroidRuntime          com.awesomeproject                   E  FATAL EXCEPTION: main
                                                                                                    Process: com.awesomeproject, PID: 6540
                                                                                                    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~KG2XHm4tjtHU2n-uUaHmAw==/com.awesomeproject-K6QII1ku6H_ZWb6oUOEsxw==/lib/arm64/libreact_render_telemetry.so"...
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
                                                                                                    	at java.lang.System.loadLibrary(System.java:1664)
                                                                                                    	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
                                                                                                    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
                                                                                                    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
                                                                                                    	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(DefaultNewArchitectureEntryPoint.kt:40)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load$default(DefaultNewArchitectureEntryPoint.kt:27)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(Unknown Source:3)
                                                                                                    	at com.awesomeproject.MainApplication.onCreate(MainApplication.java:58)
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7273)
                                                                                                    	at android.app.ActivityThread.access$1600(ActivityThread.java:301)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2159)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loop(Looper.java:263)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8278)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
2023-10-30 19:56:52.676  6540-6540  Process                 com.awesomeproject                   I  Sending signal. PID: 6540 SIG: 9
2023-10-30 19:56:52.700 17154-3628  RemoteGuar...ityMonitor com.coloros.remoteguardservice       E  onProcessDied com.awesomeproject pid = 6540 uid = 10312
2023-10-30 19:56:55.732  1449-1706  OppoThermalStats        system_server                        E  Error getting package info: com.awesomeproject
2023-10-30 19:56:55.751  4630-26579 oiface                  oiface                               E  packageSwitch pkg com.awesomeproject, enter
2023-10-30 19:56:55.751  4630-26579 oiface                  oiface                               E  current package is com.awesomeproject and pid is 6621
2023-10-30 19:56:55.885  6621-6621  Perf                    com.awesomeproject                   I  Connecting to perf service.
2023-10-30 19:56:55.888  6621-6621  NetworkSecurityConfig   com.awesomeproject                   D  No Network Security Config specified, using platform default
2023-10-30 19:56:55.888  6621-6621  NetworkSecurityConfig   com.awesomeproject                   D  No Network Security Config specified, using platform default
2023-10-30 19:56:55.896  6621-6621  SoLoader                com.awesomeproject                   V  Init System Loader delegate
2023-10-30 19:56:55.898  6621-6621  linker                  com.awesomeproject                   W  Warning: "/data/app/~~KG2XHm4tjtHU2n-uUaHmAw==/com.awesomeproject-K6QII1ku6H_ZWb6oUOEsxw==/lib/arm64/libruntimeexecutor.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
2023-10-30 19:56:55.911  6621-6621  AndroidRuntime          com.awesomeproject                   D  Shutting down VM
2023-10-30 19:56:55.911  6621-6621  AndroidRuntime          com.awesomeproject                   E  FATAL EXCEPTION: main
                                                                                                    Process: com.awesomeproject, PID: 6621
                                                                                                    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~KG2XHm4tjtHU2n-uUaHmAw==/com.awesomeproject-K6QII1ku6H_ZWb6oUOEsxw==/lib/arm64/libreact_render_telemetry.so"...
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
                                                                                                    	at java.lang.System.loadLibrary(System.java:1664)
                                                                                                    	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
                                                                                                    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
                                                                                                    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
                                                                                                    	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(DefaultNewArchitectureEntryPoint.kt:40)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load$default(DefaultNewArchitectureEntryPoint.kt:27)
                                                                                                    	at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(Unknown Source:3)
                                                                                                    	at com.awesomeproject.MainApplication.onCreate(MainApplication.java:58)
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7273)
                                                                                                    	at android.app.ActivityThread.access$1600(ActivityThread.java:301)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2159)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loop(Looper.java:263)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8278)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
2023-10-30 19:56:55.930  6621-6621  Process                 com.awesomeproject                   I  Sending signal. PID: 6621 SIG: 9
2023-10-30 19:56:55.973 17154-314   RemoteGuar...ityMonitor com.coloros.remoteguardservice       E  onProcessDied com.awesomeproject pid = 6621 uid = 10312

React Native Version

0.72.6、 0.72.4

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.22000
  CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
  Memory: 37.19 GB / 63.79 GB
Binaries:
  Node:
    version: 16.20.2
    path: D:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: D:\Program Files\nodejs\yarn.CMD
  npm:
    version: 8.19.4
    path: D:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.7.34221.43 (Visual Studio Community 2022)
Languages:
  Java: 11.0.16.1
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

local.properties

ndk.dir=C:/Microsoft/AndroidNdk64/android-ndk-r21c
sdk.dir=C:/Users/not_important/AppData/Local/Android/Sdk
cmake.dir=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake

gradle.properties

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64

# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=true

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

Steps to reproduce

  1. npx react-native@0.72.4 init AwesomeProject
  2. npm run start
  3. open androidStudio run the project
  4. The APP start success
  5. set newArchEnabled=true in AwesomeProject\android\gradle.properties
  6. repeat step 2、3
  7. The APP start andcrash , error in logcat shows as above.

Snack, code example, screenshot, or link to a repository

here is the code
https://github.com/woshi82/rn-locate-symbol-error

devices

OPPO Find N(GIH-PHO-9105) Android 11 1920*1792 12GB 高通 骁龙888(SM8350/64位)
OPPO Reno 5 Pro+(GIH-PHO-6939) Android 11 2400*1080 8GB 高通 骁龙865(SM8250/64位)
@woshi82 woshi82 added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Oct 30, 2023
@github-actions
Copy link

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.72.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cipolleschi
Copy link
Contributor

@woshi82 Thanks for trying out the New Arch on Windows!
We will definitely look into this!
cc. @cortinico

@cipolleschi cipolleschi added Platform: Windows Building on Windows. Platform: Android Android applications. labels Oct 30, 2023
@cortinico
Copy link
Contributor

Basically a duplicate of #40928
and related to android/ndk#329

The issue is caused by you attempting to use an NDK version which is not compatible with React Native:

ndk.dir=C:/Microsoft/AndroidNdk64/android-ndk-r21c

You should use ndkVersion = "23.1.7779620"

@woshi82
Copy link
Author

woshi82 commented Nov 1, 2023

Thank you for your reply
After use ndkVersion = "23.1.7779620",the project can start normally.

@flyskywhy
Copy link
Contributor

No need to rebuild third-party .aar or .so, just patch:

cd tools/android-sdk/ndk

mv ./21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/origin_libc++_shared.so
cp ./23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/

as described in Patch to fix __emutls_get_address crash on Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Android applications. Platform: Windows Building on Windows. Resolution: Answered When the issue is resolved with a simple answer Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

4 participants