Skip to content

Commit

Permalink
fix(Android): debug 闪退 (#188)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency react-native to v0.66.1

* fix(deps): update dependency react-native to v0.66.1

* fix(deps): update dependency react-native to v0.66.1

* fix:修复debug闪退

* 合并代码

* 合并代码

* fix:修复debug闪退

Co-authored-by: wangmengzhen <[email protected]>
  • Loading branch information
wwmmzz and wangmengzhen committed Oct 23, 2021
1 parent 657264a commit fca6302
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion HelloWorld/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", true);
def enableHermes = project.ext.react.get("enableHermes", false);

/**
* Architectures to build native code for in debug.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {
Expand All @@ -35,11 +33,7 @@ protected List<ReactPackage> getPackages() {
protected String getJSMainModuleName() {
return "index";
}

@Override
protected JSIModulePackage getJSIModulePackage() {
return new ReanimatedJSIModulePackage(); // <- add
}

};

@Override
Expand Down
2 changes: 1 addition & 1 deletion HelloWorld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"react-native": "0.66.1",
"react-native-device-info": "8.4.1",
"react-native-gesture-handler": "1.10.3",
"react-native-reanimated": "2.3.0-beta.3",
"react-native-reanimated": "2.2.3",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "3.8.0",
"react-native-svg": "12.1.1",
Expand Down
2 changes: 1 addition & 1 deletion template/template/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", true);
def enableHermes = project.ext.react.get("enableHermes", false);

/**
* Architectures to build native code for in debug.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {
Expand All @@ -36,10 +34,6 @@ protected String getJSMainModuleName() {
return "index";
}

@Override
protected JSIModulePackage getJSIModulePackage() {
return new ReanimatedJSIModulePackage(); // <- add
}
};

@Override
Expand Down
2 changes: 1 addition & 1 deletion template/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"react-native": "0.66.1",
"react-native-device-info": "8.4.1",
"react-native-gesture-handler": "1.10.3",
"react-native-reanimated": "2.3.0-beta.3",
"react-native-reanimated": "2.2.3",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "3.8.0",
"react-native-svg": "12.1.1",
Expand Down

0 comments on commit fca6302

Please sign in to comment.