请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

正在回答 回答被采纳积分+3

1回答

今朝 2020-11-21 18:26:20

可以看一下你的MainActivity.java吗?

0 回复 有任何疑惑可以回复我~
  • 提问者 景树 #1
    import com.facebook.react.ReactActivity;
    import com.facebook.react.ReactActivityDelegate;
    import com.facebook.react.ReactRootView;
    import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
    
    public class MainActivity extends ReactActivity {
    
      /**
       * Returns the name of the main component registered from JavaScript. This is used to schedule
       * rendering of the component.
       */
      @Override
      protected String getMainComponentName() {
        return "ximalaya";
      }
      @Override
      protected ReactActivityDelegate createReactActivityDelegate() {
         return new ReactActivityDelegate(this, getMainComponentName()) {
           @Override
           protected ReactRootView createRootView() {
            return new RNGestureHandlerEnabledRootView(MainActivity.this);
           }
         };
    回复 有任何疑惑可以回复我~ 2020-11-21 18:43:29
  • 今朝 回复 提问者 景树 #2
    你的package.json也贴出来看看
    回复 有任何疑惑可以回复我~ 2020-11-21 19:09:13
  • 提问者 景树 回复 今朝 #3
    "dependencies": {
        "babel-plugin-module-resolver": "^4.0.0",
        "react": "16.13.1",
        "react-native": "0.63.3",
        "react-native-config": "^1.4.1"
      },
      "devDependencies": {
        "@babel/core": "^7.8.4",
        "@babel/runtime": "^7.8.4",
        "@react-native-community/eslint-config": "^1.1.0",
        "@types/jest": "^25.2.3",
        "@types/react-native": "^0.63.2",
        "@types/react-test-renderer": "^16.9.2",
        "@typescript-eslint/eslint-plugin": "^2.27.0",
        "@typescript-eslint/parser": "^2.27.0",
        "babel-jest": "^25.1.0",
        "eslint": "^6.5.1",
        "jest": "^25.1.0",
        "metro-react-native-babel-preset": "^0.59.0",
        "react-test-renderer": "16.13.1",
        "typescript": "^3.8.3"
      },
    回复 有任何疑惑可以回复我~ 2020-11-21 19:11:25
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信