Skip to content

Commit 9eea238

Browse files
committed
added android package imports for reanimated library
1 parent 08a7e97 commit 9eea238

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

template/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ import com.android.build.OutputFile
7878
*/
7979

8080
project.ext.react = [
81-
enableHermes: false, // clean and rebuild if changing
81+
enableHermes: true, // clean and rebuild if changing
8282
]
8383

8484
apply from: "../../node_modules/react-native/react.gradle"

template/android/app/src/main/java/com/boilerplate/MainApplication.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
import android.app.Application;
44
import android.content.Context;
5+
import com.facebook.react.bridge.JSIModulePackage;
56
import com.facebook.react.PackageList;
67
import com.facebook.react.ReactApplication;
78
import com.facebook.react.ReactInstanceManager;
89
import com.facebook.react.ReactNativeHost;
910
import com.facebook.react.ReactPackage;
1011
import com.facebook.soloader.SoLoader;
12+
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
1113
import java.lang.reflect.InvocationTargetException;
1214
import java.util.List;
1315

@@ -33,6 +35,11 @@ protected List<ReactPackage> getPackages() {
3335
protected String getJSMainModuleName() {
3436
return "index";
3537
}
38+
39+
@Override
40+
protected JSIModulePackage getJSIModulePackage() {
41+
return new ReanimatedJSIModulePackage(); // for React Native Reanimated
42+
}
3643
};
3744

3845
@Override

0 commit comments

Comments
 (0)