2016-09-22 87 views
3

在我的react-native應用程序中,我當前有一個原生Android視圖(用java編寫)正確呈現。當我嘗試把我的反應,本地JavaScript組件之一內,我收到以下錯誤:在原生android視圖(UI組件)中呈現react-native組件

java.lang.ClassCastException: com.yardsale.AndroidNativeListViewManager 
cannot be cast to com.facebook.react.uimanager.ViewGroupManager 

有沒有人遇到過嗎?如果是這樣,任何幫助將不勝感激!

回答

0

你的com.yardsale.AndroidNativeListViewManager擴展了ViewGroupManager。對於ViewGroup,您應該擴展ViewGroupManager而不是SimpleViewManager

extends ViewGroupManager