android Eclipse RecyclerView InflateException - android

I am developing android project using Eclipse, integrating RecyclerView for my project. Currently I am using Recyclerview as a library project. But when I want to include its android-support-v7-recyclerview.jar I am getting InflateException at the runtime. I have tried all the possibilities to include jar into project but none of them are working, giving same error as InflateException.
Anyone has solved this problem with RecyclerView integration from Eclipse ?
Here is my logcat,
12-11 15:29:33.007: E/AndroidRuntime(2324): Process: com.example.recyclerviewtest, PID: 2324
12-11 15:29:33.007: E/AndroidRuntime(2324): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.recyclerviewtest/com.example.recyclerviewtest.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v7.widget.RecyclerView
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.ActivityThread.access$800(ActivityThread.java:151)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.os.Handler.dispatchMessage(Handler.java:102)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.os.Looper.loop(Looper.java:135)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.ActivityThread.main(ActivityThread.java:5254)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.reflect.Method.invoke(Native Method)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.reflect.Method.invoke(Method.java:372)
12-11 15:29:33.007: E/AndroidRuntime(2324): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
12-11 15:29:33.007: E/AndroidRuntime(2324): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
12-11 15:29:33.007: E/AndroidRuntime(2324): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v7.widget.RecyclerView
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.createView(LayoutInflater.java:633)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
12-11 15:29:33.007: E/AndroidRuntime(2324): at com.example.recyclerviewtest.MainActivity.onCreate(MainActivity.java:14)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.Activity.performCreate(Activity.java:5990)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
12-11 15:29:33.007: E/AndroidRuntime(2324): ... 10 more
12-11 15:29:33.007: E/AndroidRuntime(2324): Caused by: java.lang.reflect.InvocationTargetException
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.reflect.Constructor.newInstance(Native Method)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.view.LayoutInflater.createView(LayoutInflater.java:607)
12-11 15:29:33.007: E/AndroidRuntime(2324): ... 21 more
12-11 15:29:33.007: E/AndroidRuntime(2324): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/recyclerview/R$styleable;
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:481)
12-11 15:29:33.007: E/AndroidRuntime(2324): at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:450)
12-11 15:29:33.007: E/AndroidRuntime(2324): ... 24 more
12-11 15:29:33.007: E/AndroidRuntime(2324): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.recyclerview.R$styleable" on path: DexPathList[[zip file "/data/app/com.example.recyclerviewtest-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-11 15:29:33.007: E/AndroidRuntime(2324): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-11 15:29:33.007: E/AndroidRuntime(2324): ... 26 more
12-11 15:29:33.007: E/AndroidRuntime(2324): Suppressed: java.lang.ClassNotFoundException: android.support.v7.recyclerview.R$styleable
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.Class.classForName(Native Method)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-11 15:29:33.007: E/AndroidRuntime(2324): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-11 15:29:33.007: E/AndroidRuntime(2324): ... 27 more
12-11 15:29:33.007: E/AndroidRuntime(2324): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

Related

Xamarin Android Support v7 Cardview Sample Fails

When I run the Xamarin Android Support v7 Cardview SAMPLE project, I get the following error: "Error inflating class android.support.v7.widget.CardView". How can I get this to work? Find below the stack trace.
Android.Views.InflateException: Binary XML file line #1: Error inflating class android.support.v7.widget.CardView ---> Java.Lang.Reflect.InvocationTargetException: ---> Java.Lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/cardview/R$styleable; ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.cardview.R$styleable" on path: DexPathList[[zip file "/data/app/com.xamarin.supportv7cardview.sample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xamarin.supportv7cardview.sample-1/lib/arm, /vendor/lib, /system/lib]]
at --- End of managed exception stack trace ---
at java.lang.ClassNotFoundException: Didn't find class "android.support.v7.cardview.R$styleable" on path: DexPathList[[zip file "/data/app/com.xamarin.supportv7cardview.sample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xamarin.supportv7cardview.sample-1/lib/arm, /vendor/lib, /system/lib]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at at android.support.v7.widget.CardView.initialize(CardView.java:203)
at at android.support.v7.widget.CardView.<init>(CardView.java:101)
at at java.lang.reflect.Constructor.newInstance(Native Method)
at at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
at at android.app.Activity.setContentView(Activity.java:2153)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.n_onCreate(Native Method)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.onCreate(MainActivity.java:28)
at at android.app.Activity.performCreate(Activity.java:5976)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at at android.app.ActivityThread.access$800(ActivityThread.java:144)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5221)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
at Suppressed: java.lang.ClassNotFoundException: android.support.v7.cardview.R$styleable
at at java.lang.Class.classForName(Native Method)
at at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
at ... 28 more
at Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
--- End of inner exception stack trace ---
at --- End of managed exception stack trace ---
at java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/cardview/R$styleable;
at at android.support.v7.widget.CardView.initialize(CardView.java:203)
at at android.support.v7.widget.CardView.<init>(CardView.java:101)
at at java.lang.reflect.Constructor.newInstance(Native Method)
at at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
at at android.app.Activity.setContentView(Activity.java:2153)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.n_onCreate(Native Method)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.onCreate(MainActivity.java:28)
at at android.app.Activity.performCreate(Activity.java:5976)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at at android.app.ActivityThread.access$800(ActivityThread.java:144)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5221)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
at Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.cardview.R$styleable" on path: DexPathList[[zip file "/data/app/com.xamarin.supportv7cardview.sample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xamarin.supportv7cardview.sample-1/lib/arm, /vendor/lib, /system/lib]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at ... 27 more
at Suppressed: java.lang.ClassNotFoundException: android.support.v7.cardview.R$styleable
at at java.lang.Class.classForName(Native Method)
at at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
at ... 28 more
at Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
--- End of inner exception stack trace ---
at --- End of managed exception stack trace ---
at java.lang.reflect.InvocationTargetException
at at java.lang.reflect.Constructor.newInstance(Native Method)
at at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
at at android.app.Activity.setContentView(Activity.java:2153)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.n_onCreate(Native Method)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.onCreate(MainActivity.java:28)
at at android.app.Activity.performCreate(Activity.java:5976)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at at android.app.ActivityThread.access$800(ActivityThread.java:144)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5221)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
at Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/cardview/R$styleable;
at at android.support.v7.widget.CardView.initialize(CardView.java:203)
at at android.support.v7.widget.CardView.<init>(CardView.java:101)
at ... 25 more
at Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.cardview.R$styleable" on path: DexPathList[[zip file "/data/app/com.xamarin.supportv7cardview.sample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xamarin.supportv7cardview.sample-1/lib/arm, /vendor/lib, /system/lib]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at ... 27 more
at Suppressed: java.lang.ClassNotFoundException: android.support.v7.cardview.R$styleable
at at java.lang.Class.classForName(Native Method)
at at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
at ... 28 more
at Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00084] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1029
at Android.App.Activity.SetContentView (Int32 layoutResID) [0x00070] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.App.Activity.cs:4403
at AndroidSupportSample.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x0000e] in /Users/Dennis/projects/cobalt-git/Rideshare-01/Components/xamandroidsupportv7cardview-23.1.1.1/samples/AndroidSupportSample/AndroidSupportSample/MainActivity.cs:27
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.App.Activity.cs:2212
at at (wrapper dynamic-method) System.Object:855888e7-3749-47dd-bc4c-c0cf15ffd7a6 (intptr,intptr,intptr)
at --- End of managed exception stack trace ---
at android.view.InflateException: Binary XML file line #1: Error inflating class android.support.v7.widget.CardView
at at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
at at android.app.Activity.setContentView(Activity.java:2153)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.n_onCreate(Native Method)
at at md5b5c4d68d7f0084075bca6dac9c5e1a71.MainActivity.onCreate(MainActivity.java:28)
at at android.app.Activity.performCreate(Activity.java:5976)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at at android.app.ActivityThread.access$800(ActivityThread.java:144)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5221)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
at Caused by: java.lang.reflect.InvocationTargetException
at at java.lang.reflect.Constructor.newInstance(Native Method)
at at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at ... 22 more
at Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/cardview/R$styleable;
at at android.support.v7.widget.CardView.initialize(CardView.java:203)
at at android.support.v7.widget.CardView.<init>(CardView.java:101)
at ... 25 more
at Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.cardview.R$styleable" on path: DexPathList[[zip file "/data/app/com.xamarin.supportv7cardview.sample-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xamarin.supportv7cardview.sample-1/lib/arm, /vendor/lib, /system/lib]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at ... 27 more
at Suppressed: java.lang.ClassNotFoundException: android.support.v7.cardview.R$styleable
at at java.lang.Class.classForName(Native Method)
at at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
at ... 28 more
at Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
If you find any issues in added library project fix those things
In eclipse do Project > Clean on the library project and the Android project will solve the problem

Gradle plugin 2.1.0: app crashes on launch

When I run the app the application crash.
I'm using the new android plugin 2.1.0
Failed to create directory /data/data/ric.es.pruebavideo/files/instant-run/dex
05-05
Couldn't create dex code folder
05-05 22:13:05.024 28257-28257/ric.es.pruebavideo D/AndroidRuntime: Shutting down VM
05-05 22:13:05.026 28257-28257/ric.es.pruebavideo E/AndroidRuntime: FATAL EXCEPTION: main
Process: ric.es.pruebavideo, PID: 28257
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{ric.es.pruebavideo/ric.es.pruebavideo.VideoRActivity}: java.lang.ClassNotFoundException: Didn't find class "ric.es.pruebavideo.VideoRActivity" on path: DexPathList[[zip file "/data/app/ric.es.pruebavideo-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "ric.es.pruebavideo.VideoRActivity" on path: DexPathList[[zip file "/data/app/ric.es.pruebavideo-2/base.apk"],nativeLibraryDirectories=[/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 android.app.Instrumentation.newActivity(Instrumentation.java:1066)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
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:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Suppressed: java.lang.ClassNotFoundException: ric.es.pruebavideo.VideoRActivity
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)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
05-05 22:18:21.137 29791-29791/ric.es.pruebavideo D/Mobility: Selected camera resolution: 1280 x 720
05-05 22:18:21.210 29791-29791/ric.es.pruebavideo I/Choreographer: Skipped 30 frames! The application may be doing too much work on its main thread.
Downgrading grudle to 2.0.0 worked for me

Error when trying to run project from Android Studio on my Nexus 6

I have my Nexus 6 connected via ADB and the Google USB driver is functional (I can run adb commands from command line) but when I try to compile my simple package on the device, it spits out this error:
`
02-02 13:38:26.091 12659-12659/com.jeremy.myfirstproject E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.jeremy.myfirstproject, PID: 12659
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.jeremy.myfirstproject/com.jeremy.myfirstproject.MyActivity}: java.lang.ClassNotFoundException: Didn't find class "com.jeremy.myfirstproject.MyActivity" on path: DexPathList[[zip file "/data/app/com.jeremy.myfirstproject-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2224)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2375)
at android.app.ActivityThread.access$900(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5238)
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:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.jeremy.myfirstproject.MyActivity" on path: DexPathList[[zip file "/data/app/com.jeremy.myfirstproject-1/base.apk"],nativeLibraryDirectories=[/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 android.app.Instrumentation.newActivity(Instrumentation.java:1065)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2214)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2375)
            at android.app.ActivityThread.access$900(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5238)
            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:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Suppressed: java.lang.NoClassDefFoundError: com.jeremy.myfirstproject.MyActivity
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:321)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
... 14 more
Suppressed: java.lang.ClassNotFoundException: com.jeremy.myfirstproject.MyActivity
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)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
`
Sorry about the wall of text. I'm not sure what the problem is here, maybe someone can sort it out here?
Create a new project in Android studio and copy everything from the old project into the new one.

Inflating class android.support.v7.widget.Toolbar and application crashes

I'm using AndroidSlidingUpPanel and launching the Demo sample, the app crashes:
Could not find method android.support.v4.view.ViewConfigurationCompat.hasPermanentMenuKey, referenced from method android.support.v7.app.ActionBarActivityDelegateBase.openPanel**
12-11 15:52:46.621: E/AndroidRuntime(1051): FATAL EXCEPTION: main
12-11 15:52:46.621: E/AndroidRuntime(1051): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sothree.slidinguppanel.demo/com.sothree.slidinguppanel.demo.DemoActivity}: android.view.InflateException: Binary XML file line #23: Error inflating class android.support.v7.widget.Toolbar
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.access$700(ActivityThread.java:159)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.os.Handler.dispatchMessage(Handler.java:99)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.os.Looper.loop(Looper.java:176)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.main(ActivityThread.java:5419)
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Method.invoke(Method.java:525)
12-11 15:52:46.621: E/AndroidRuntime(1051): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
12-11 15:52:46.621: E/AndroidRuntime(1051): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
12-11 15:52:46.621: E/AndroidRuntime(1051): at dalvik.system.NativeStart.main(Native Method)
12-11 15:52:46.621: E/AndroidRuntime(1051): Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class android.support.v7.widget.Toolbar
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.createView(LayoutInflater.java:626)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102)
12-11 15:52:46.621: E/AndroidRuntime(1051): at com.sothree.slidinguppanel.demo.DemoActivity.onCreate(DemoActivity.java:29)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.Activity.performCreate(Activity.java:5372)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
12-11 15:52:46.621: E/AndroidRuntime(1051): ... 11 more
12-11 15:52:46.621: E/AndroidRuntime(1051): Caused by: java.lang.reflect.InvocationTargetException
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Constructor.constructNative(Native Method)
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.createView(LayoutInflater.java:600)
12-11 15:52:46.621: E/AndroidRuntime(1051): ... 24 more
12-11 15:52:46.621: E/AndroidRuntime(1051): Caused by: java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.getDrawable
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:133)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.widget.Toolbar.<init>(Toolbar.java:249)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.widget.Toolbar.<init>(Toolbar.java:191)
12-11 15:52:46.621: E/AndroidRuntime(1051): ... 27 more
The third line of the error message says that in your XML file, the class android.support.v7.widget.Toolbar is not found.
Have you well import android.support.v7 library in your project?
Take a look here : https://developer.android.com/tools/support-library/setup.html

Android 5.0.1 app stops and returns InvocationTargetException Error

I have built an Android app that until updating the Android API, from 19 to 21, ran successfully. Now when I run the app, the login page does appear, but just as a user logs in and starts the MainActivity, the app crashes stating 'App has stopped', while the error is thrown:
12-11 17:46:21.411: E/ActivityThread(12327): Pause GC
12-11 17:46:21.411: E/ActivityThread(12327): java.lang.reflect.InvocationTargetException
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invoke(Method.java:515)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.pauseGC(ActivityThread.java:5410)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2277)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.access$900(ActivityThread.java:169)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-11 17:46:21.411: E/ActivityThread(12327): at android.os.Handler.dispatchMessage(Handler.java:102)
12-11 17:46:21.411: E/ActivityThread(12327): at android.os.Looper.loop(Looper.java:146)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.main(ActivityThread.java:5487)
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invoke(Method.java:515)
12-11 17:46:21.411: E/ActivityThread(12327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
12-11 17:46:21.411: E/ActivityThread(12327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
12-11 17:46:21.411: E/ActivityThread(12327): at dalvik.system.NativeStart.main(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): Caused by: java.lang.UnsatisfiedLinkError: Native method not found: dalvik.system.VMRuntime.pauseGc:(Ljava/lang/String;)I
12-11 17:46:21.411: E/ActivityThread(12327): at dalvik.system.VMRuntime.pauseGc(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): ... 15 more
12-11 17:46:21.446: D/AndroidRuntime(12327): Shutting down VM
12-11 17:46:21.446: W/dalvikvm(12327): threadid=1: thread exiting with uncaught exception (group=0x41daec08)
12-11 17:46:21.451: E/AndroidRuntime(12327): FATAL EXCEPTION: main
12-11 17:46:21.451: E/AndroidRuntime(12327): Process: com.example.feastapp, PID: 12327
12-11 17:46:21.451: E/AndroidRuntime(12327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.feastapp/com.example.feastapp.MainActivity}: java.lang.NullPointerException
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2334)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.access$900(ActivityThread.java:169)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.os.Handler.dispatchMessage(Handler.java:102)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.os.Looper.loop(Looper.java:146)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.main(ActivityThread.java:5487)
12-11 17:46:21.451: E/AndroidRuntime(12327): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 17:46:21.451: E/AndroidRuntime(12327): at java.lang.reflect.Method.invoke(Method.java:515)
12-11 17:46:21.451: E/AndroidRuntime(12327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
12-11 17:46:21.451: E/AndroidRuntime(12327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
12-11 17:46:21.451: E/AndroidRuntime(12327): at dalvik.system.NativeStart.main(Native Method)
12-11 17:46:21.451: E/AndroidRuntime(12327): Caused by: java.lang.NullPointerException
12-11 17:46:21.451: E/AndroidRuntime(12327): at com.example.feastapp.MainActivity.onCreate(MainActivity.java:77)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.Activity.performCreate(Activity.java:5451)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
12-11 17:46:21.451: E/AndroidRuntime(12327): ... 11 more
This is a very perplexing situation as just before the update, the app ran just fine. Absolutely no changes were made to the code. At present, the login page can appear but when entering credentials and pressing send the app crashes immediately. Any Idea on how to alleviate?

Categories

Resources