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

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

Related

android Eclipse RecyclerView InflateException

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

Crash in Google Maps caused by a null pointer in android.widget.EdgeEffect.<init>

I've been seeing a crash on the ZTE Z993 (Android 4.1.1) that occurs in apps that use a MapView or SupportMapFragment (e.g. Lyft, Yelp, Airbnb). It looks like the crash occurs in the initialization of EdgeEffect within a ListView that Google Maps uses. The link below points to a git repo that reproduces the crash. I've also included the stacktrace. Has anyone seen this? Can anyone suggest a fix? Thanks!
github repo for a project that reproduces the crash
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.googlemapstest/com.test.googlemapstest.MapsActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2080)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2105)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4795)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
at android.app.Activity.setContentView(Activity.java:1867)
at com.test.googlemapstest.MapsActivity.onCreate(MapsActivity.java:18)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2044)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2105)
            at android.app.ActivityThread.access$600(ActivityThread.java:133)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4795)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.widget.EdgeEffect.<init>(EdgeEffect.java:153)
at android.widget.AbsListView.setOverScrollMode(AbsListView.java:824)
at android.view.View.<init>(View.java:3237)
at android.view.View.<init>(View.java:3295)
at android.view.ViewGroup.<init>(ViewGroup.java:427)
at android.widget.AdapterView.<init>(AdapterView.java:235)
at android.widget.AbsListView.<init>(AbsListView.java:758)
at android.widget.ListView.<init>(ListView.java:141)
at android.widget.ListView.<init>(ListView.java:137)
at com.google.maps.api.android.lib6.c.p.<init>(Unknown Source)
at com.google.maps.api.android.lib6.c.p.<init>(Unknown Source)
at com.google.maps.api.android.lib6.c.dd.<init>(Unknown Source)
at com.google.maps.api.android.lib6.c.el.a(Unknown Source)
at com.google.maps.api.android.lib6.c.ab.a(Unknown Source)
at com.google.maps.api.android.lib6.c.aa.a(Unknown Source)
at com.google.android.gms.maps.internal.x.onTransact(SourceFile:107)
at android.os.Binder.transact(Binder.java:326)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1786)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:922)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1114)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1216)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2169)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
            at android.app.Activity.setContentView(Activity.java:1867)
            at com.test.googlemapstest.MapsActivity.onCreate(MapsActivity.java:18)
            at android.app.Activity.performCreate(Activity.java:5008)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2044)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2105)
            at android.app.ActivityThread.access$600(ActivityThread.java:133)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4795)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
Bug reported here:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=7915

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?

NumberFormatException: Invalid int: "8.0dip" only on Galaxy Tab 2

I'm currently facing to a glitch from an Galaxy Tab 10.1 2 (GT-P5110) which give me that error, but just on that device. I tried on divers emulators (I use genymotion: Nexus 5-7-10, Galaxy S3-4-5, Galaxy Note 2-3) and devices (Galaxy S -2-3-4, Nexus 5-7).
But just on that Galaxy tab 2 10.1 (GT-P5110) I have this error.
I found this link, but this didn't really help me out to solve that problem.
07-01 11:06:58.832 14227-14227/com.********.********.com E/AndroidRuntime﹕ FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #36: Error inflating class com.package.fr.views.SofiaLiTextView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4895)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: Invalid int: "8.0dip"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:375)
at java.lang.Integer.parseInt(Integer.java:366)
at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
at android.content.res.TypedArray.getInt(TypedArray.java:254)
at android.widget.TextView.<init>(TextView.java:997)
at android.widget.TextView.<init>(TextView.java:562)
at com.package.fr.views.SofiaLiTextView.<init>(SofiaLiTextView.java:55)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
            at android.view.LayoutInflater.createView(LayoutInflater.java:587)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4895)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
            at dalvik.system.NativeStart.main(Native Method)
Apparently this would be a bug from the Samsung's Android like said here
Very frustrating >:)>:)
If you are using android:paddingstart attribute, make sure that your target api level is below 17, else try remove this attribute and run the app. It will work.

Classnot found exception while dealing with android admob Banner

I am getting this very annoying error in LogCat
12-11 13:40:53.178: E/AndroidRuntime(4483): FATAL EXCEPTION: main
12-11 13:40:53.178: E/AndroidRuntime(4483): java.lang.RuntimeException: Unable to resume activity {com.vahzay.android.smstrove/com.vahzay.android.smstrove.ListMessages}: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2491)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2519)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2033)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.access$600(ActivityThread.java:127)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.os.Handler.dispatchMessage(Handler.java:99)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.os.Looper.loop(Looper.java:137)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.main(ActivityThread.java:4508)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.reflect.Method.invoke(Method.java:511)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
12-11 13:40:53.178: E/AndroidRuntime(4483): at dalvik.system.NativeStart.main(Native Method)
12-11 13:40:53.178: E/AndroidRuntime(4483): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.rInflate(LayoutInflater.java:741)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.inflate(LayoutInflater.java:491)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:252)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.Activity.setContentView(Activity.java:1837)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.vahzay.android.smstrove.ListMessages.onResume(ListMessages.java:650)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1159)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.Activity.performResume(Activity.java:4553)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2481)
12-11 13:40:53.178: E/AndroidRuntime(4483): ... 12 more
12-11 13:40:53.178: E/AndroidRuntime(4483): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView
12-11 13:40:53.178: E/AndroidRuntime(4483): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.createView(LayoutInflater.java:554)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
12-11 13:40:53.178: E/AndroidRuntime(4483): ... 22 more
I have included the admob-sdk-android.jar through order and import from
properties-->android-->java Build Path.
Is there something else I need to deal with to add adds in my app? My Xml file has following code
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android1="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000" >
<com.google.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="xxxx"
ads:adSize="BANNER"
ads:testDevices="TEST_EMULATOR"
ads:loadAdOnCreate="true"/> ...
I am able to resolve the problem by adding GoogleAdMobAdsSdk.jar in my project/libs folder.

Categories

Resources