Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native 0.66.5 failed with this library #2

Open
chj-damon opened this issue Sep 1, 2023 · 9 comments
Open

react-native 0.66.5 failed with this library #2

chj-damon opened this issue Sep 1, 2023 · 9 comments

Comments

@chj-damon
Copy link

/Users/damon/Documents/thundersdata/frontend/rn-template/node_modules/react-native-z-view/android/src/main/java/com/reactnativezview/ZViewRootViewGroup.java:11: 错误: 找不到符号
import com.facebook.react.uimanager.JSPointerDispatcher;
^
符号: 类 JSPointerDispatcher
位置: 程序包 com.facebook.react.uimanager
/Users/damon/Documents/thundersdata/frontend/rn-template/node_modules/react-native-z-view/android/src/main/java/com/reactnativezview/ZViewRootViewGroup.java:22: 错误: 找不到符号
private JSPointerDispatcher mJSPointerDispatcher;
^
符号: 类 JSPointerDispatcher
位置: 类 ZViewRootViewGroup
/Users/damon/Documents/thundersdata/frontend/rn-template/node_modules/react-native-z-view/android/src/main/java/com/reactnativezview/ZViewRootViewGroup.java:26: 错误: 找不到符号
if (ReactFeatureFlags.dispatchPointerEvents) {
^
符号: 变量 dispatchPointerEvents
位置: 类 ReactFeatureFlags
/Users/damon/Documents/thundersdata/frontend/rn-template/node_modules/react-native-z-view/android/src/main/java/com/reactnativezview/ZViewRootViewGroup.java:26: 错误: 非法的含括号表达式
if (ReactFeatureFlags.dispatchPointerEvents) {
^
/Users/damon/Documents/thundersdata/frontend/rn-template/node_modules/react-native-z-view/android/src/main/java/com/reactnativezview/ZViewRootViewGroup.java:27: 错误: 找不到符号
this.mJSPointerDispatcher = new JSPointerDispatcher(this);
^
符号: 类 JSPointerDispatcher
位置: 类 ZViewRootViewGroup
/Users/damon/Documents/thundersdata/frontend/rn-template/node_modules/react-native-z-view/android/src/main/java/com/reactnativezview/ZViewRootViewGroup.java:91: 错误: 找不到符号
this.mJSTouchDispatcher.onChildEndedNativeGesture(ev, this.mEventDispatcher);
^
符号: 方法 onChildEndedNativeGesture(MotionEvent,EventDispatcher)
位置: 类型为JSTouchDispatcher的变量 mJSTouchDispatcher
6 个错误

FAILURE: Build failed with an exception.

@chj-damon
Copy link
Author

0.72 works fine.

@chj-damon
Copy link
Author

I also noticed that ZView cannot cover StatusBar and NavigationBar, which makes the effect a litter weird to me.

image

here's the code:

<ZView>
  <View
    style={{
      width,
      height,
      backgroundColor: 'rgba(0, 0, 0, 0.5)',
    }}
  >
    <Text>{message}</Text>
  </View>
</ZView>

@chj-damon
Copy link
Author

I also tried on IOS, it works fine.

@chj-damon
Copy link
Author

simulator_screenshot_FB3D0E5B-1731-43AA-A099-9C9146D821B8

@intergalacticspacehighway
Copy link
Owner

ZView cannot cover StatusBar and NavigationBar

@chj-damon This should be fixed in 0.2.3

react-native 0.66.5 failed with this library

Looks like it is failing pointer event imports which were recently added. Is something blocking you from upgrading to the latest RN?

@chj-damon
Copy link
Author

I'm just maintaining a UI Library which supports most react-native versions from 0.66 above. I don't think it's a good idea to tell developers this UI Library is only compatiable with the latest RN.

@intergalacticspacehighway
Copy link
Owner

@chj-damon Published a new version 0.2.4. It should fix the 0.66.5 compilation issue. Let me know if you still face any issues.

@chj-damon
Copy link
Author

tried the latest 0.2.4 version. something went wrong.
here's my code:

<ZView touchable>
  <View
    style={{
      width,
      // height: 200,
      // padding: 40,
      backgroundColor: 'rgba(0, 0, 0, 0.5)',
    }}
  >
    <Text style={{color: 'white'}}>Full size overlay view</Text>
  </View>
</ZView>

when height or padding not set, it works fine. ZView will cover the StatusBar, but once either of height or padding been set, it won't work.

821693562944_ pic
831693562973_ pic

@intergalacticspacehighway
Copy link
Owner

@chj-damon Seems to be working fine for me on a physical device and also emulator with/without height/padding. Can you try to repro in a new RN app and check if it is reproducible?

Screenshot 2023-09-01 at 4 14 27 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants