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

[Android][Windows] java.lang.NoClassDefFoundError: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView #7373

Closed
meanwang opened this issue May 4, 2016 · 9 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@meanwang
Copy link

meanwang commented May 4, 2016

(environment: PC:windows 7,android studio; Mobile: nexus 6,android 6.0.1;React Native version 0.20.1;react native android jar version 0.20.1)

when i try to use react native.i get a crash,and i have search for sulotion but no one workes for me.

here is crash log:

W/System.err: java.lang.RuntimeException: An error occurred while executing doInBackground()
W/System.err: at android.os.AsyncTask$3.done(AsyncTask.java:309)
W/System.err: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
W/System.err: at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:242)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
W/System.err: at java.lang.Thread.run(Thread.java:818)
W/System.err: Caused by: java.lang.NoClassDefFoundError: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView
W/System.err: at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
W/System.err: at java.lang.Class.getDexCacheType(Class.java:476)
W/System.err: at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:166)
W/System.err: at java.lang.reflect.Method.getParameterTypes(Method.java:170)
W/System.err: at java.lang.Class.getDeclaredMethods(Class.java:673)
W/System.err: at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:397)
W/System.err: at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:301)
W/System.err: at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:115)
W/System.err: at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:110)
W/System.err: at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findManagerSetter(ViewManagerPropertyUpdater.java:73)
W/System.err: at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:60)
W/System.err: at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:199)
W/System.err: at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:62)
W/System.err: at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:120)
W/System.err: at com.facebook.react.uimanager.UIManagerModule.(UIManagerModule.java:80)
W/System.err: at com.facebook.react.CoreModulesPackage.createNativeModules(CoreModulesPackage.java:64)
W/System.err: at com.facebook.react.ReactInstanceManagerImpl.processPackage(ReactInstanceManagerImpl.java:793)
W/System.err: at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:719)
W/System.err: at com.facebook.react.ReactInstanceManagerImpl.access$600(ReactInstanceManagerImpl.java:91)
W/System.err: at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:184)
W/System.err: at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:169)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err: ... 4 more
W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView" on path: DexPathList[[zip file "/data/app/com.wesocial.apollo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.wesocial.apollo-1/lib/arm, /data/app/com.wesocial.apollo-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
W/System.err: at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
W/System.err: ... 26 more
W/System.err: Suppressed: java.lang.NoClassDefFoundError: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView
W/System.err: at dalvik.system.DexFile.defineClassNative(Native Method)
W/System.err: at dalvik.system.DexFile.defineClass(DexFile.java:226)
W/System.err: at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
W/System.err: at dalvik.system.DexPathList.findClass(DexPathList.java:338)
W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
W/System.err: ... 29 more
W/System.err: Suppressed: java.lang.ClassNotFoundException: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView
W/System.err: at java.lang.Class.classForName(Native Method)
W/System.err: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
W/System.err: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
W/System.err: ... 28 more
W/System.err: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.wesocial.apollo, PID: 31433
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NoClassDefFoundError: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView
at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
at java.lang.Class.getDexCacheType(Class.java:476)
at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:166)
at java.lang.reflect.Method.getParameterTypes(Method.java:170)
at java.lang.Class.getDeclaredMethods(Class.java:673)
at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:397)
at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:301)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:115)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:110)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findManagerSetter(ViewManagerPropertyUpdater.java:73)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:60)
at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:199)
at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:62)
at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:120)
at com.facebook.react.uimanager.UIManagerModule.(UIManagerModule.java:80)
at com.facebook.react.CoreModulesPackage.createNativeModules(CoreModulesPackage.java:64)
at com.facebook.react.ReactInstanceManagerImpl.processPackage(ReactInstanceManagerImpl.java:793)
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:719)
at com.facebook.react.ReactInstanceManagerImpl.access$600(ReactInstanceManagerImpl.java:91)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:184)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:169)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
at java.lang.Thread.run(Thread.java:818) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView" on path: DexPathList[[zip file "/data/app/com.wesocial.apollo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.wesocial.apollo-1/lib/arm, /data/app/com.wesocial.apollo-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
at java.lang.Class.getDexCacheType(Class.java:476) 
at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:166) 
at java.lang.reflect.Method.getParameterTypes(Method.java:170) 
at java.lang.Class.getDeclaredMethods(Class.java:673) 
at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:397) 
at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:301) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:115) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:110) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findManagerSetter(ViewManagerPropertyUpdater.java:73) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:60) 
at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:199) 
at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:62) 
at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:120) 
at com.facebook.react.uimanager.UIManagerModule.(UIManagerModule.java:80) 
at com.facebook.react.CoreModulesPackage.createNativeModules(CoreModulesPackage.java:64) 
at com.facebook.react.ReactInstanceManagerImpl.processPackage(ReactInstanceManagerImpl.java:793) 
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:719) 
at com.facebook.react.ReactInstanceManagerImpl.access$600(ReactInstanceManagerImpl.java:91) 
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:184) 
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:169) 
at android.os.AsyncTask$2.call(AsyncTask.java:295) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
at java.lang.Thread.run(Thread.java:818) 
Suppressed: java.lang.NoClassDefFoundError: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:226)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
at dalvik.system.DexPathList.findClass(DexPathList.java:338)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.j

and before crash ,there is some log:

Could not find generated setter for class com.facebook.react.views.art.ARTRenderableViewManager
Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
Could not find generated setter for class com.facebook.react.views.text.ReactTextInlineImageViewManager
Could not find generated setter for class com.facebook.react.views.text.ReactTextInlineImageShadowNode
Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
Could not find generated setter for class com.facebook.react.views.recyclerview.RecyclerViewBackedScrollViewManager

@radko93
Copy link
Contributor

radko93 commented May 4, 2016

Try updating react native to current version. Don't forget to use react-native upgrade too.

@meanwang
Copy link
Author

meanwang commented May 5, 2016

@radko93 thank you! I have update react-native and it works.
but maven's nearest version of react-native is 0.20.1,so i must import local react-native project.it's really troublesome.

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/androidwindows-javalangnoclassdeffounderror-comfacebookreactviewsrecyclerviewrecyclerviewbackedscrollview

Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.

@greensky123
Copy link

i have integrated react native project with my android project sucessful by android studio ,but i use jenkens build the mixed project. it make the error as follows:
Caused by: java.lang.NoClassDefFoundError: com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView
at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
at java.lang.Class.getDexCacheType(Class.java:479)
at java.lang.reflect.ArtMethod.getDexCacheType(ArtMethod.java:229)
at java.lang.reflect.ArtMethod.getParameterTypes(ArtMethod.java:169)
at java.lang.reflect.Method.getParameterTypes(Method.java:174)
at java.lang.Class.getDeclaredMethods(Class.java:772)
at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:397)
at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:301)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:115)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:110)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findManagerSetter(ViewManagerPropertyUpdater.java:73)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:60)
at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:199)
at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:70)
at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:141)
at com.facebook.react.uimanager.UIManagerModule.(UIManagerModule.java:92)
at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:194)
at com.facebook.react.CoreModulesPackage.access$200(CoreModulesPackage.java:66)
at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:132)
at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:129)
at com.facebook.react.LazyReactPackage.createNativeModules(LazyReactPackage.java:44)
at com.facebook.react.XReactInstanceManagerImpl.processPackage(XReactInstanceManagerImpl.java:940)
at com.facebook.react.XReactInstanceManagerImpl.createReactContext(XReactInstanceManagerImpl.java:850)
at com.facebook.react.XReactInstanceManagerImpl.access$600(XReactInstanceManagerImpl.java:107)
at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:207)
at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:186)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:818) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.views.recyclerview.RecyclerViewBackedScrollView" on path: DexPathList[[zip file "/data/app/com.minxing.mxtesting-1/base.apk"],nativeLibraryDirectories=[/data/app/com.minxing.mxtesting-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
at java.lang.Class.getDexCacheType(Class.java:479) 
at java.lang.reflect.ArtMethod.getDexCacheType(ArtMethod.java:229) 
at java.lang.reflect.ArtMethod.getParameterTypes(ArtMethod.java:169) 
at java.lang.reflect.Method.getParameterTypes(Method.java:174) 
at java.lang.Class.getDeclaredMethods(Class.java:772) 
at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:397) .


why ?? my react native just a simple demo ,also i dont's use the RecyclerViewBackedScrollView yet.
com.minxing.mxtesting-1/base.apk is my apk.

@greensky123
Copy link

(environment: PC:windows 10, jenkins ; Mobile: HTC e9W,android 5.0.1;React Native version 0.34.1; react :15.3.2 )

@superandrew213
Copy link

@greensky123 have you tested it on android 6?

@greensky123
Copy link

@superandrew213 no , i hadn't. i have find the reason of my error, because my jenkins 's node module version is 0.20.0 so the class is not found . if you have the some error , maybe the version is too low.

@superandrew213
Copy link

superandrew213 commented Dec 15, 2016

@greensky123 I'm only getting this error on Android 5 when launching the app

@Krupen
Copy link

Krupen commented May 31, 2017

For me, problem was because "package" in AndroidManifest.xml and "applicationId" in build.gradle(app) was different. Making them same solved the problem for me.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants