Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit b337398

Browse files
committed
fix android
1 parent bd88694 commit b337398

File tree

4 files changed

+329
-307
lines changed

4 files changed

+329
-307
lines changed

android/app/src/main/java/com/cpm/MainActivity.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@ public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
3131
@Override
3232
protected ReactRootView createRootView() {
3333
ReactRootView reactRootView = new ReactRootView(getContext());
34-
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
35-
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
3634
return reactRootView;
3735
}
38-
@Override
39-
protected boolean isConcurrentRootEnabled() {
40-
// If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
41-
// More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
42-
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
43-
}
4436
}
4537
}

android/settings.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
rootProject.name = 'cpm'
22
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
33
include ':app'
4-
eval "set -- $(
5-
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
6-
xargs -n1 |
7-
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
8-
tr '\n' ' '
9-
)" '"$@"'
4+
includeBuild('../node_modules/react-native-gradle-plugin')
5+
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
6+
include(":ReactAndroid")
7+
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
8+
include(":ReactAndroid:hermes-engine")
9+
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
10+
}

0 commit comments

Comments
 (0)