android.view.InflateException when launch on Android 5.0 - android

I have an android project. After compile and install on Android 4.0, it can works normally. But when install it on Android 5.0 and launch it, exception is thrown such as "android.view.InflateException: Binary XML file line #40: Error inflating class android.widget.Toolbar".
Is there any change on between Android 5.0 and before version?
Below is the error log
01-05 18:40:40.540: E/AndroidRuntime(18827): FATAL EXCEPTION: main
01-05 18:40:40.540: E/AndroidRuntime(18827): Process: com.example.sbp_client_test, PID: 18827
01-05 18:40:40.540: E/AndroidRuntime(18827): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sbp_client_test/com.example.sbp_client_test.MainActivity}: android.view.InflateException: Binary XML file line #40: Error inflating class android.widget.Toolbar
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ActivityThread.access$800(ActivityThread.java:144)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.os.Looper.loop(Looper.java:135)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ActivityThread.main(ActivityThread.java:5221)
01-05 18:40:40.540: E/AndroidRuntime(18827): at java.lang.reflect.Method.invoke(Native Method)
01-05 18:40:40.540: E/AndroidRuntime(18827): at java.lang.reflect.Method.invoke(Method.java:372)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
01-05 18:40:40.540: E/AndroidRuntime(18827): Caused by: android.view.InflateException: Binary XML file line #40: Error inflating class android.widget.Toolbar
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.createView(LayoutInflater.java:633)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3489)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3561)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:367)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.Activity.setContentView(Activity.java:2144)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ListActivity.ensureList(ListActivity.java:312)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ListActivity.setListAdapter(ListActivity.java:263)
01-05 18:40:40.540: E/AndroidRuntime(18827): at com.example.sbp_client_test.MainActivity.onCreate(MainActivity.java:167)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.Activity.performCreate(Activity.java:5933)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
01-05 18:40:40.540: E/AndroidRuntime(18827): ... 10 more
01-05 18:40:40.540: E/AndroidRuntime(18827): Caused by: java.lang.reflect.InvocationTargetException
01-05 18:40:40.540: E/AndroidRuntime(18827): at java.lang.reflect.Constructor.newInstance(Native Method)
01-05 18:40:40.540: E/AndroidRuntime(18827): at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.LayoutInflater.createView(LayoutInflater.java:607)
01-05 18:40:40.540: E/AndroidRuntime(18827): ... 28 more
01-05 18:40:40.540: E/AndroidRuntime(18827): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RtlSpacingHelper.setDirection(boolean)' on a null object reference
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.widget.Toolbar.onRtlPropertiesChanged(Toolbar.java:296)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.View.resolvePadding(View.java:13245)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.ViewGroup.resolvePadding(ViewGroup.java:6032)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.View.initializeScrollbarsInternal(View.java:4558)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.View.<init>(View.java:4150)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.view.ViewGroup.<init>(ViewGroup.java:491)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.widget.Toolbar.<init>(Toolbar.java:183)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.widget.Toolbar.<init>(Toolbar.java:179)
01-05 18:40:40.540: E/AndroidRuntime(18827): at android.widget.Toolbar.<init>(Toolbar.java:175)
01-05 18:40:40.540: E/AndroidRuntime(18827): ... 31 more

Related

Admob get a conflict with Facebook`s SDK

After init FacebookSdk manually in my appliction
FacebookSdk.sdkInitialize(getApplicationContext());
When i play RewardedVideo of Admob,the app crashed:
Here is the crash log
01-05 17:27:47.780 E/AndroidRuntime(32002): FATAL EXCEPTION: main
01-05 17:27:47.780 E/AndroidRuntime(32002): Process: com.vikings.hl, PID: 32002
01-05 17:27:47.780 E/AndroidRuntime(32002): java.lang.NoClassDefFoundError: Failed resolution of: Lbolts/AppLinks;
01-05 17:27:47.780 E/AndroidRuntime(32002): at com.facebook.appevents.internal.SourceApplicationInfo$Factory.create(SourceApplicationInfo.java:131)
01-05 17:27:47.780 E/AndroidRuntime(32002): at com.facebook.appevents.internal.ActivityLifecycleTracker.onActivityCreated(ActivityLifecycleTracker.java:131)
01-05 17:27:47.780 E/AndroidRuntime(32002): at com.facebook.appevents.internal.ActivityLifecycleTracker$1.onActivityCreated(ActivityLifecycleTracker.java:77)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.Application.dispatchActivityCreated(Application.java:197)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.Activity.onCreate(Activity.java:1008)
01-05 17:27:47.780 E/AndroidRuntime(32002): at com.google.android.gms.ads.AdActivity.onCreate(Unknown Source)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.Activity.performCreate(Activity.java:6910)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.ActivityThread.-wrap12(ActivityThread.java)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.os.Handler.dispatchMessage(Handler.java:105)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.os.Looper.loop(Looper.java:156)
01-05 17:27:47.780 E/AndroidRuntime(32002): at android.app.ActivityThread.main(ActivityThread.java:6523)
01-05 17:27:47.780 E/AndroidRuntime(32002): at java.lang.reflect.Method.invoke(Native Method)
01-05 17:27:47.780 E/AndroidRuntime(32002): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
01-05 17:27:47.780 E/AndroidRuntime(32002): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
01-05 17:27:47.780 E/AndroidRuntime(32002): Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.AppLinks" on path: DexPathList[[zip file "/data/app/com.vikings.hl-1/base.apk"],nativeLibraryDirectories=[/data/app/com.vikings.hl-1/lib/arm, /system/fake-libs, /data/app/com.vikings.hl-1/base.apk!/lib/armeabi, /system/lib, /vendor/lib, /system/vendor/lib, /product/lib]]
01-05 17:27:47.780 E/AndroidRuntime(32002): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-05 17:27:47.780 E/AndroidRuntime(32002): at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
01-05 17:27:47.780 E/AndroidRuntime(32002): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-05 17:27:47.780 E/AndroidRuntime(32002): ... 18 more
its seems "bolts.AppLinks" is belong to FaceBookSdk,when id didnt init FaceBookSdk,everything is ok,did anyone have meet this problem?

Multidex throws java.lang.NoClassDefFoundError, RxJava, Retrolambda

I decided to create test example:
multidex true (1.0.1), rxjava 2.1.0, retrolambda 3.6.0
So I see bug on Android 4-6
Android 4
06-20 21:13:05.736 4123-4123/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: example.com.multidexandroid6rxjava.MainActivity$$Lambda$1
at example.com.multidexandroid6rxjava.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Android 5.1.1
FATAL EXCEPTION: main
Process: example.com.multidexandroid6rxjava, PID: 3729
java.lang.NoClassDefFoundError: Failed resolution of: Lexample/com/multidexandroid6rxjava/MainActivity$$Lambda$1;
at example.com.multidexandroid6rxjava.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
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 "example.com.multidexandroid6rxjava.MainActivity$$Lambda$1" on path: DexPathList[[zip file "/data/app/example.com.multidexandroid6rxjava-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
Simple example
Please try the following code.
It worked on Android 6.
before
protected <T> void connectObservableField(#NonNull T observableField, #Nullable java.util.function.Consumer<? super T> consumer) {
after
protected <T> void connectObservableField(#NonNull T observableField, #Nullable io.reactivex.functions.Consumer<? super T> consumer) {
java.util.function.* seems not to work with retrolambda.
So you try to use io.reactivex.functions.Consumer instead.
See also https://github.com/orfjackal/retrolambda/issues/126#issuecomment-289307387

why do GeoCoder give timed out?

I am using geocoder to get the address but I am getting exception all the time
I have gone through many links in stack over flow but couldnt find any solution
addressList = geocoder.getFromLocation(
latitude, longitude, 1);
this is the exception
java.io.IOException: Timed out waiting for response from server
01-05 17:35:03.915 8708-8708/com.mindtree.vishram W/System.err: at android.location.Geocoder.getFromLocation(Geocoder.java:136)
01-05 17:35:03.915 8708-8708/com.mindtree.vishram W/System.err: at com.mindtree.vishram.presenter.FragmentPresenters.OrderMedDeliveryAddressPresenter.getAddressFromGeoCordinates(OrderMedDeliveryAddressPresenter.java:90)
01-05 17:35:03.915 8708-8708/com.mindtree.vishram W/System.err: at com.mindtree.vishram.presenter.FragmentPresenters.OrderMedDeliveryAddressPresenter.getGeoCordinates(OrderMedDeliveryAddressPresenter.java:76)
01-05 17:35:03.916 8708-8708/com.mindtree.vishram W/System.err: at com.mindtree.vishram.presenter.FragmentPresenters.OrderMedDeliveryAddressPresenter.currentLocationImageViewClick(OrderMedDeliveryAddressPresenter.java:42)
01-05 17:35:03.916 8708-8708/com.mindtree.vishram W/System.err: at com.mindtree.vishram.view.FragmentViews.OrderMedicineDeliveryAddressfrag$1.onClick(OrderMedicineDeliveryAddressfrag.java:67)
01-05 17:35:03.917 8708-8708/com.mindtree.vishram W/System.err: at android.view.View.performClick(View.java:5204)
01-05 17:35:03.917 8708-8708/com.mindtree.vishram W/System.err: at android.view.View$PerformClick.run(View.java:21153)
01-05 17:35:03.917 8708-8708/com.mindtree.vishram W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
01-05 17:35:03.917 8708-8708/com.mindtree.vishram W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
01-05 17:35:03.918 8708-8708/com.mindtree.vishram W/System.err: at android.os.Looper.loop(Looper.java:148)
01-05 17:35:03.918 8708-8708/com.mindtree.vishram W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
01-05 17:35:03.918 8708-8708/com.mindtree.vishram W/System.err: at java.lang.reflect.Method.invoke(Native Method)
01-05 17:35:03.918 8708-8708/com.mindtree.vishram W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-05 17:35:03.918 8708-8708/com.mindtree.vishram W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

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

Parcel android.os.Parcel: Unmarshalling unknown type code 2131231007 at offset 548

My apk built by gradle has a problem ,but built by eclipse does not have.But it dose not happen to every body. I didn't meet this problem. But some of my users met this problem.
you can see the line :
at com.coohuaclient.ui.activity.BaseActivity.onCreate(SourceFile:30)
My code of this line is :
super.onCreate(savedInstanceState);
I have no idea why the gradle has this problem. Please help me
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.coohuaclient/com.coohuaclient.ui.activity.HomeActivity}: java.lang.RuntimeException: Parcel android.os.Parcel#41301c78: Unmarshalling unknown type code 2131231007 at offset 548
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
at android.app.ActivityThread.access$600(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel#41301c78: Unmarshalling unknown type code 2131231007 at offset 548
at android.os.Parcel.readValue(Parcel.java:2032)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2255)
at android.os.Parcel.readSparseArray(Parcel.java:1687)
at android.os.Parcel.readValue(Parcel.java:2022)
at android.os.Parcel.readMapInternal(Parcel.java:2226)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1240)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:845)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1088)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1070)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(SourceFile:1856)
at android.support.v4.app.FragmentActivity.onCreate(SourceFile:210)
at com.coohuaclient.ui.activity.BaseActivity.onCreate(SourceFile:30)
at com.coohuaclient.ui.activity.HomeActivity.onCreate(SourceFile:67)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1084)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
... 11 more
java.lang.RuntimeException: Parcel android.os.Parcel#41301c78: Unmarshalling unknown type code 2131231007 at offset 548
at android.os.Parcel.readValue(Parcel.java:2032)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2255)
at android.os.Parcel.readSparseArray(Parcel.java:1687)
at android.os.Parcel.readValue(Parcel.java:2022)
at android.os.Parcel.readMapInternal(Parcel.java:2226)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1240)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:845)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1088)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1070)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(SourceFile:1856)
at android.support.v4.app.FragmentActivity.onCreate(SourceFile:210)
at com.coohuaclient.ui.activity.BaseActivity.onCreate(SourceFile:30)
at com.coohuaclient.ui.activity.HomeActivity.onCreate(SourceFile:67)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1084)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
at android.app.ActivityThread.access$600(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)

Categories

Resources