Tuesday, February 2, 2016

Android Studio - Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.CoordinatorLayout"

Getting following exception while trying to run a Test app. My Activity extends AppCompatActivity.

The exception is thrown when I call setContentView with activity name under onCreate() method.

setContentView(R.layout.activity_welcome_screen);

I see the underlying issue is following :

Suppressed: java.lang.ClassNotFoundException: android.support.design.widget.CoordinatorLayout

Here is the full stack trace:

Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.CoordinatorLayout" on path: DexPathList[[zip file "/data/app/com.mobile.app.android-2/base.apk"],nativeLibraryDirectories=[/data/app/com.
is.mobile.app.android-2/lib/arm64, /vendor/lib64, /system/lib64]]
            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 android.view.LayoutInflater.createView(LayoutInflater.java:578)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:483) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:415) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:366) 
            at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256) 
            at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)                         
            at android.app.Activity.performCreate(Activity.java:6550) 
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120) 
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3108) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3263) 
            at android.app.ActivityThread.access$1000(ActivityThread.java:197) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1687) 
            at android.os.Handler.dispatchMessage(Handler.java:102) 
            at android.os.Looper.loop(Looper.java:145) 
            at android.app.ActivityThread.main(ActivityThread.java:6897) 
            at java.lang.reflect.Method.invoke(Native Method) 
            at java.lang.reflect.Method.invoke(Method.java:372) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
            Suppressed: java.lang.ClassNotFoundException: android.support.design.widget.CoordinatorLayout
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
            ... 23 more
             Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
02-02 11:46:56.471 28238-28238/com.mobile.app.android I/Process: Sending signal. PID: 28238 SIG: 9

No comments:

Post a Comment