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

安卓端报错 Cannot read property 'bubblingEventTypes' of null #46

Open
arafat813 opened this issue Oct 14, 2024 · 2 comments
Open

Comments

@arafat813
Copy link

IOS正常,但是一旦安卓端报错 有人遇到过么

@arafat813
Copy link
Author

这是 我的代码
<FlatList stickyHeaderIndices={stickyHeaderIndices} style={{paddingLeft: 10, paddingRight: 10}} contentContainerStyle={{ paddingBottom: Platform.OS === 'ios' ? insets.bottom + 40 : insets.bottom + 110, }} data={data} bounces={true} renderItem={({item}) => <Item item={item} />} keyExtractor={item => item.id} nestedScrollEnabled refreshControl={ <RefreshControl refreshing={refreshing} onRefresh={() => { setRefreshing(true); setTimeout(() => { setRefreshing(false); }, 2000); }} /> } />
跟实例一样

@arafat813
Copy link
Author

其实是因为 库中使用了被弃用的API
`
Task :react-native-screens:bundleLibCompileToJarDebug

Task :sdcx_pull-to-refresh:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
203 actionable tasks: 17 executed, 186 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

注: /Users/goldriven2023/GoldrivenRnApp/node_modules/react-native-gesture-handler/android/paper/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: /Users/goldriven2023/GoldrivenRnApp/node_modules/react-native-safe-area-context/android/src/paper/java/com/th3rdwave/safeareacontext/NativeSafeAreaContextSpec.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: /Users/goldriven2023/GoldrivenRnApp/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/NativeScreensModuleSpec.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
/Users/goldriven2023/GoldrivenRnApp/node_modules/@sdcx/pull-to-refresh/android/src/main/java/com/reactnative/pulltorefresh/PullToRefresh.java:21: 错误: 无法访问NestedScrollingParent
public class PullToRefresh extends SmartRefreshLayout implements ReactOverflowView {
^
找不到android.support.v4.view.NestedScrollingParent的类文件
警告: 未知的枚举常量 Scope.LIBRARY
原因: 找不到android.support.annotation.RestrictTo$Scope的类文件
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
警告: 未知的枚举常量 Scope.LIBRARY
警告: 未知的枚举常量 Scope.LIBRARY_GROUP
警告: 未知的枚举常量 Scope.SUBCLASSES
1 个错误
27 个警告

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':sdcx_pull-to-refresh:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --info option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 5s
info Run CLI with --verbose flag for more details.
`

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

1 participant