reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
216 stars 327 forks source link

Update pillars-turbomodule.md #670

Closed wupeng2506 closed 1 year ago

wupeng2506 commented 1 year ago

修复一些实践中会出错的地方

netlify[bot] commented 1 year ago

Deploy Preview for reactnativecn ready!

Name Link
Latest commit 2b62584c6f8c200eaef369e5450d0c6c47e96f0b
Latest deploy log https://app.netlify.com/sites/reactnativecn/deploys/6374d8e03630470008604ed2
Deploy Preview https://deploy-preview-670--reactnativecn.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

sunnylqm commented 1 year ago

这个具体是碰到什么错呢?

wupeng2506 commented 1 year ago

安卓构建失败:

  1. 找不到NativeCalculatorSpec类,发现java文件中是package com.RTNCalculator;packjson中是"javaPackageName": "com.calculator"
  2. 开始的js接口是ts语法,而且最好说明是放在js目录下的
  3. 安卓目录,文件命名前后对不上,前面是小写rtncalculator,后面是大写RTNCalculator,前面文件名是RTNCalculatorPackage.java,后面是CalculatorPackage.java,正确应该是CalculatorPackage.java跟类名保持一致
sunnylqm commented 1 year ago

感谢提醒,现已有和官方一致的修复 https://github.com/reactnativecn/react-native-website/pull/713