Coder Social home page Coder Social logo

Comments (11)

react-native-bot avatar react-native-bot commented on August 26, 2024
⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

from react-native.

react-native-bot avatar react-native-bot commented on August 26, 2024
⚠️ 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.74.5. 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.

from react-native.

react-native-bot avatar react-native-bot commented on August 26, 2024
⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

from react-native.

react-native-bot avatar react-native-bot commented on August 26, 2024
⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - undefined. 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.

from react-native.

cortinico avatar cortinico commented on August 26, 2024

We need a reproducer to help you further @RustamHashymov

from react-native.

cipolleschi avatar cipolleschi commented on August 26, 2024

@RustamHashymov For Android, you should not enable bridgeless mode alone, but you should modify the gradle.properties file to set the newArch flag to true.

In 0.74, the New Architecture includes bridgeless enabled by default.
Bridgeless requires also TurboModule and Fabric to work properly, you cannot enable it alone.

from react-native.

RustamHashymov avatar RustamHashymov commented on August 26, 2024

@cipolleschi I mean here

package com.reproducerapp

import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {

  override val reactNativeHost: ReactNativeHost =
      object : DefaultReactNativeHost(this) {
        override fun getPackages(): List<ReactPackage> =
            PackageList(this).packages.apply {
              // Packages that cannot be autolinked yet can be added manually here, for example:
              // add(MyReactNativePackage())
            }

        override fun getJSMainModuleName(): String = "index"

        override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

        override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
        override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
      }

  override val reactHost: ReactHost
    get() = getDefaultReactHost(applicationContext, reactNativeHost)

  override fun onCreate() {
    super.onCreate()
    SoLoader.init(this, false)
    if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
      // If you opted-in for the New Architecture, we load the native entry point for this app.
      load()
    }
  }
}

If I try to build and bundle with load() not load(bridgelessEnabled=false) it fails

from react-native.

cortinico avatar cortinico commented on August 26, 2024

@cipolleschi I mean here

@RustamHashymov please provide a reproducer project using this template: https://github.com/react-native-community/reproducer-react-native

from react-native.

cipolleschi avatar cipolleschi commented on August 26, 2024

@RustamHashymov Yes, I know: Bridgeless is not supposed to be enabled in that way, in isolation. That setup will not work as it is not meant to work.

To enable Bridgeless for Android you need to enable the New Architecture:

  1. Navigate to <yourProject>/android folder
  2. Open the gradle.properties file
  3. Change the newArchEnabled flag from false to true
  4. Navigate back to <yourProject> folder
  5. Run yarn android

And it will work!

That Boolean in the MainActivity is there if you want to disable Bridgeless after you enabled the New Architecture.

from react-native.

RustamHashymov avatar RustamHashymov commented on August 26, 2024

@cipolleschi I forgot to mention that I have enabled it in my project and app runs successfully, but after I enable bridgeless, I can't run app and have that error.

from react-native.

cipolleschi avatar cipolleschi commented on August 26, 2024

If you enabled the new architecture on 0.74, you don't have to enable also bridgeless. It is enabled by default.
See reactwg/react-native-new-architecture#174

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.