react-native-scrollable-tab-view icon indicating copy to clipboard operation
react-native-scrollable-tab-view copied to clipboard

android error Check the render method of `AnimatedComponent`

Open yanhongchang-1105 opened this issue 4 years ago • 8 comments

Steps to Reproduce

Expected Behavior

Actual Behavior

yanhongchang-1105 avatar Feb 03 '21 07:02 yanhongchang-1105

Did you solve the problem?

ahmetozalp avatar Feb 13 '21 09:02 ahmetozalp

查看错误日志发现是1.0版本使用的语法是require的方式引入。后来发现react-native-scrollable-tab-view 中引入了: @react-native-community/viewpager 所以进入react-native-scrollable-tab-view 源码; 把index.js中的 const ViewPager = require('@react-native-community/viewpager'); 改成:import ViewPager from '@react-native-community/viewpager'; 这样就可以了,希望作者可以看到修改一下

CloudComputing-linux avatar Feb 17 '21 05:02 CloudComputing-linux

i faced the same problem, and i solved the problem by installing:

"@react-native-community/viewpager": "^3.3.0",
"react-native-scrollable-tab-view": "git+https://github.com/ptomasroos/react-native-scrollable-tab-view.git",

hungdev avatar Mar 06 '21 09:03 hungdev

It caused by '@react-native-community/viewpager' version. Here are two solutions:

  • 1.downgrade '@react-native-community/viewpager' version to 3.3.0

  • 2.change react-native-scrollable-tab-view/index.js code:

let ViewPager = require('@react-native-community/viewpager');
if(typeof ViewPager === 'object' && typeof ViewPager.default === 'function') {
  ViewPager = ViewPager.default;
}

I test it in both @react-native-community/viewpager version 3.3.0 and 5.0.11 or just use my package @yz1311/react-native-scrollable-tab-view (>=1.0.6)

yz1311 avatar Mar 17 '21 02:03 yz1311

查看错误日志发现是1.0版本使用的语法是require的方式引入。后来发现react-native-scrollable-tab-view 中引入了: @react-native-community/viewpager 所以进入react-native-scrollable-tab-view 源码; 把index.js中的 const ViewPager = require('@react-native-community/viewpager'); 改成:import ViewPager from '@react-native-community/viewpager'; 这样就可以了,希望作者可以看到修改一下

thanks a lot, works for me.

hunao0221 avatar Apr 02 '21 06:04 hunao0221

您好!我在运行移动端代码时显示Check the render method of AnimatedComponent,import {ScrollView,SafeAreaView,TouchableOpacity,Animated} from 'react-native',也使用到 const AnimatedContainer = Animated.createAnimatedComponent(Container) 但是显示了这个错误。我按照您的方法进行修改但好像没有找到对应的 const ViewPager = require('@react-native-community/viewpager'); 并且我使用的是ScrollView,而不是ViewPager,请问有什么方法可以解决吗?

crush12132 avatar Jun 17 '21 07:06 crush12132

It caused by '@react-native-community/viewpager' version. Here are two solutions:

  • 1.downgrade '@react-native-community/viewpager' version to 3.3.0
  • 2.change react-native-scrollable-tab-view/index.js code:
let ViewPager = require('@react-native-community/viewpager');
if(typeof ViewPager === 'object' && typeof ViewPager.default === 'function') {
  ViewPager = ViewPager.default;
}

I test it in both @react-native-community/viewpager version 3.3.0 and 5.0.11 or just use my package @yz1311/react-native-scrollable-tab-view (>=1.0.6)

im used method 2, but my tabbar can not swipe

fukemy avatar Apr 28 '22 08:04 fukemy

It caused by '@react-native-community/viewpager' version. Here are two solutions:

  • 1.downgrade '@react-native-community/viewpager' version to 3.3.0
  • 2.change react-native-scrollable-tab-view/index.js code:
let ViewPager = require('@react-native-community/viewpager');
if(typeof ViewPager === 'object' && typeof ViewPager.default === 'function') {
  ViewPager = ViewPager.default;
}

I test it in both @react-native-community/viewpager version 3.3.0 and 5.0.11 or just use my package @yz1311/react-native-scrollable-tab-view (>=1.0.6)

thanks a lot, works for me.

NguyenLuongVinh avatar Apr 25 '23 06:04 NguyenLuongVinh