Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native Could not find generated setter for class

I'm trying to implement ViewGroupManager to create my own native view. For one of my tasks, I need a link to my view instance. To receive it I use @ReactProperty annotation, but it looks like it doesn't work (even for not my components). I found in a log many lines "Could not find generated setter for class..."

03-23 15:10:43.104 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager
03-23 15:10:43.104 3144-3174/com.reactapp.test I/dalvikvm: Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
03-23 15:10:43.104 3144-3174/com.reactapp.test W/dalvikvm: VFY: unable to resolve static method 41824: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
03-23 15:10:43.104 3144-3174/com.reactapp.test D/dalvikvm: VFY: replacing opcode 0x71 at 0x000a
03-23 15:10:43.112 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
03-23 15:10:43.112 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager
03-23 15:10:43.112 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
03-23 15:10:43.116 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager
03-23 15:10:43.116 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
03-23 15:10:43.128 3144-3144/com.reactapp.test W/EGL_genymotion: eglSurfaceAttrib not implemented
03-23 15:10:43.128 3144-3147/com.reactapp.test D/dalvikvm: GC_CONCURRENT freed 284K, 4% free 11148K/11527K, paused 10ms+0ms, total 12ms
03-23 15:10:43.128 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
03-23 15:10:43.136 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
03-23 15:10:43.136 3144-3144/com.reactapp.test D/OpenGLRenderer: Enabling debug mode 0
03-23 15:10:43.156 3144-3144/com.reactapp.test D/OpenGLRenderer: TextureCache::get: create texture(0xb7a788e8): name, size, mSize = 1, 4096, 4096
03-23 15:10:43.156 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
03-23 15:10:43.156 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
03-23 15:10:43.156 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
03-23 15:10:43.160 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
03-23 15:10:43.160 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
03-23 15:10:43.160 3144-3147/com.reactapp.test D/dalvikvm: GC_CONCURRENT freed 489K, 5% free 11199K/11719K, paused 11ms+1ms, total 16ms
03-23 15:10:43.160 3144-3175/com.reactapp.test D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 3ms
03-23 15:10:43.164 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
03-23 15:10:43.168 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
03-23 15:10:43.172 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
03-23 15:10:43.172 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
03-23 15:10:43.172 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
03-23 15:10:43.172 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
03-23 15:10:43.188 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
03-23 15:10:43.192 3144-3147/com.reactapp.test D/dalvikvm: GC_CONCURRENT freed 408K, 5% free 11264K/11783K, paused 11ms+2ms, total 20ms
03-23 15:10:43.224 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
03-23 15:10:43.224 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager
03-23 15:10:43.232 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode
03-23 15:10:43.232 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
03-23 15:10:43.232 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
03-23 15:10:43.232 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
03-23 15:10:43.232 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode
03-23 15:10:43.236 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
03-23 15:10:43.252 3144-3147/com.reactapp.test D/dalvikvm: GC_CONCURRENT freed 367K, 4% free 11321K/11783K, paused 10ms+0ms, total 14ms
03-23 15:10:43.256 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
03-23 15:10:43.256 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
03-23 15:10:43.256 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
03-23 15:10:43.264 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
03-23 15:10:43.280 3144-3147/com.reactapp.test D/dalvikvm: GC_CONCURRENT freed 405K, 5% free 11347K/11847K, paused 10ms+1ms, total 16ms
03-23 15:10:43.284 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
03-23 15:10:43.284 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
03-23 15:10:43.284 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
03-23 15:10:43.292 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
03-23 15:10:43.292 3144-3175/com.reactapp.test W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.reactlibrary.MyNativeViewModule

Technical details:

  • React: 15.4.2
  • React-native: 0.42.3
  • React-native-cli: 2.0.1

Import for ReactProp annotation is:

import com.facebook.react.uimanager.annotations.ReactProp;
like image 930
Tamplier Avatar asked Mar 23 '17 16:03

Tamplier


1 Answers

I fixed it for my own component by setting the @ReactProp(name="...") correct.

I had made a mistakes here and it did not matched what was declared in javascript. So the warning means: I am missing one of the props I can set!

Check your javascript code and make sure that every prop there has a matching @ReactProp

So for the 6692 bug I suspect the same thing is going on...

like image 144
bluevoid Avatar answered Oct 21 '22 21:10

bluevoid