Fatal Exception: java.lang.NoClassDefFoundError: android/graphics/Outline
See original GitHub issueInfo:
- ReactNative:
0.30
- Platform:
Android
- Device:
Nexus 5
- Android OS:
4.4.2
- Rooted:
true
Problem:
The problem, as I see it, is that android.graphics.Outline
was introduced in Lollipop 5.0 and it is used in ReactViewBackgroundDrawable.java
as an import and as a method parameter. So OSs less than this will crash when this is hit.
StackTrace:
Fatal Exception: java.lang.NoClassDefFoundError: android/graphics/Outline
at java.lang.Class.getDeclaredMethods(Class.java)
at java.lang.Class.getDeclaredMethods(Class.java:656)
at android.view.ViewDebug.getExportedPropertyMethods(ViewDebug.java:960)
at android.view.ViewDebug.exportMethods(ViewDebug.java:1047)
at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:997)
at android.view.ViewDebug.exportFields(ViewDebug.java:1175)
at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:996)
at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:983)
at android.view.ViewDebug.dumpView(ViewDebug.java:900)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:855)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dump(ViewDebug.java:793)
at android.view.ViewDebug.dispatchCommand(ViewDebug.java:416)
at android.view.ViewRootImpl$W.executeCommand(ViewRootImpl.java:6258)
at android.view.IWindow$Stub.onTransact(IWindow.java:65)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(NativeStart.java)
Caused by java.lang.ClassNotFoundException: Didn't find class "android.graphics.Outline" on path: DexPathList[[zip file "/data/app/com.curse.highwind-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.curse.highwind-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at java.lang.Class.getDeclaredMethods(Class.java)
at java.lang.Class.getDeclaredMethods(Class.java:656)
at android.view.ViewDebug.getExportedPropertyMethods(ViewDebug.java:960)
at android.view.ViewDebug.exportMethods(ViewDebug.java:1047)
at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:997)
at android.view.ViewDebug.exportFields(ViewDebug.java:1175)
at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:996)
at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:983)
at android.view.ViewDebug.dumpView(ViewDebug.java:900)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:855)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dumpViewHierarchy(ViewDebug.java:867)
at android.view.ViewDebug.dump(ViewDebug.java:793)
at android.view.ViewDebug.dispatchCommand(ViewDebug.java:416)
at android.view.ViewRootImpl$W.executeCommand(ViewRootImpl.java:6258)
at android.view.IWindow$Stub.onTransact(IWindow.java:65)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(NativeStart.java)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:15 (4 by maintainers)
Top Results From Across the Web
java.lang.NoClassDefFoundError: android/graphics/drawable ...
Samsung devices with Android 4.4 crash like this when classes extending View define methods which return or take parameters of types that ...
Read more >NoClassDefFoundError - Android Developers
java.util.concurrent.atomic. Overview. Classes ... NoClassDefFoundError; NoClassDefFoundError. Android Developers ... public class NoClassDefFoundError
Read more >java.lang.NoClassDefFoundError - DigitalOcean
java.lang.NoClassDefFoundError is runtime error thrown when a required class is not found in the classpath and hence JVM is unable to load ...
Read more >3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile...
Read more >Android fatal exception java. lang. noclassdeffounderror - Weebly
does not work with fatal exception: java.lang.NoClassDefFoundError ... NoClassDefFoundError: android/graphics/Outline at java.lang.Class.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you set
multiDexEnabled true
inandroid/app/build.gradle
, modifyMainApplication.java
by the followingSo it seems everyone sees this on a rooted Nexus 5 4.4.2 (API level 19), one that has ViewDebug enabled. That seems like quite the awful coincidence, but whomever that rogue user is using all our different apps, I’m not too worried about them anymore. 😃
My guess is that there is some automated system out there running all Android apps in their rooted debug environment, unintentionally breaking when attempting to run our React Native apps. Perhaps it’s used for rendering screenshots, for interacting with apps-in-the-cloud, or maybe a grad student research project, or who knows what else.