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

typo + update #4387

Open
DerBasler opened this issue Dec 5, 2024 · 1 comment
Open

typo + update #4387

DerBasler opened this issue Dec 5, 2024 · 1 comment

Comments

@DerBasler
Copy link

Description

The java version of the https://reactnative.dev/docs/integration-with-existing-apps?android-language=java#updating-your-application-class has some errors.

What is the problem?

It would throw an error you copy and paste it.

How can we address it?

Adjust the import from
import com.facebook.react.soloader.OpenSourceMergedSoMapping
to
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
notice the ;

In additon to the import this part seams to need some adjustmens
@OverRide
public void onCreate() {
super.onCreate();

  • SoLoader.init(this, OpenSourceMergedSoMapping);
  • if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
  • DefaultNewArchitectureEntryPoint.load();
    
  • }
    }

should be:
@OverRide
public void onCreate() {
super.onCreate();
try {
SoLoader.init(this, OpenSourceMergedSoMapping.INSTANCE);
} catch (IOException e) {
throw new RuntimeException(e);
}
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
DefaultNewArchitectureEntryPoint.load();
}
}
}
according to facebook/react-native#47633

Why is it important?

To keep the content relevant

Who needs this?

The devs

When should this happen (use version numbers if needed)?

Soon

@cortinico
Copy link
Contributor

Can you send a PR?

DerBasler added a commit to DerBasler/react-native-website that referenced this issue Dec 9, 2024
DerBasler added a commit to DerBasler/react-native-website that referenced this issue Dec 12, 2024
remove try catch since this has now been fixed inside SoLoader
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

No branches or pull requests

2 participants