I am currently integrating Twilio Video with my AIR application. When I try Twilio VideoView in my activity layout, its giving error "Error inflating class com.twilio.video.VideoView"
Here is my layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="vertical"
tools:context="com.nethram.videoextn.views.MainActivity">
<Button
android:id="#+id/testBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="clickHandler"
android:text="#string/click" />
<com.twilio.video.VideoView
android:id="#+id/videoView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
I decompiled the jar file which is used to generate the ane extension file to check if Twilio video package is included or not. Twilio video packages are included in the jar file generated.
Here is the error I got
E/AndroidRuntime: FATAL EXCEPTION: main
Process: air.VideoApp, PID: 27627
java.lang.RuntimeException: Unable to start activity ComponentInfo{air.VideoApp/com.nethram.videoextn.views.MainActivity}: android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating class com.twilio.video.VideoView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2456)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating class com.twilio.video.VideoView
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:401)
at android.app.Activity.setContentView(Activity.java:2196)
at com.nethram.videoextn.views.MainActivity.onCreate(MainActivity.java:26)
at android.app.Activity.performCreate(Activity.java:6304)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.twilio.video.VideoView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:401)
at android.app.Activity.setContentView(Activity.java:2196)
at com.nethram.videoextn.views.MainActivity.onCreate(MainActivity.java:26)
at android.app.Activity.performCreate(Activity.java:6304)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.twilio.video.VideoView" on path: DexPathList[[zip file "/data/app/air.VideoApp-1/base.apk"],nativeLibraryDirectories=[/data/app/air.VideoApp-1/lib/arm, /data/app/air.VideoApp-1/base.apk!/lib/armeabi-v7a, /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.view.LayoutInflater.createView(LayoutInflater.java:583)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:401)
at android.app.Activity.setContentView(Activity.java:2196)
at com.nethram.videoextn.views.MainActivity.onCreate(MainActivity.java:26)
at android.app.Activity.performCreate(Activity.java:6304)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
at android.app.ActivityThread.access$900(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Suppressed: java.lang.ClassNotFoundException: com.twilio.video.VideoView
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)
... 24 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Any Idea how this can be solved. Found some answers on error type but non of these helped me out
Previously I was using AIR SDK version 16, old SDK versions doesn't have android v7 appcompat support while Twilio video SDK uses latest v7 support.
So after upgrading AIR SDK version to latest(currently v.29), I can integrate twilio VideoView in my layout.
Related
When I debug my android app and I try to open my graph fragment, my app crashes. I put the "androidplot-core-1.5.7.aar" library in my "libs" project folder and implement it in my "build.gradle" dependencies.
I don't have this issue with the "androidplot-core-1.2.1.aar" library.
here is the graph fragment xml code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ap="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.androidplot.xy.XYPlot
android:id="#+id/imuPlot"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="#style/APDefacto.Light"/>
</LinearLayout>
Here is what it shows when I want to show a graph fragment and debug crashes :
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.poc2.irisa.plugandpos.poc2, PID: 5048
android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class com.androidplot.xy.XYPlot
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.androidplot.xy.XYPlot
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at com.poc2.irisa.plugandpos.poc2.o.a(:52)
at android.support.v4.app.m.b(:2346)
at android.support.v4.app.z.a(:1428)
at android.support.v4.app.z.h(:1759)
at android.support.v4.app.z.a(:1827)
at android.support.v4.app.d.c(:797)
at android.support.v4.app.z.a(:2596)
at android.support.v4.app.z.b(:2383)
at android.support.v4.app.z.c(:2338)
at android.support.v4.app.z.p(:2245)
at android.support.v4.app.t.run(:703)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6120)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/halfhp/fig/Fig;
at com.androidplot.Plot.a(:561)
at com.androidplot.Plot.a(:403)
at com.androidplot.Plot.<init>(:324)
at com.androidplot.xy.XYPlot.<init>(:143)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at com.poc2.irisa.plugandpos.poc2.o.a(:52)
at android.support.v4.app.m.b(:2346)
at android.support.v4.app.z.a(:1428)
at android.support.v4.app.z.h(:1759)
at android.support.v4.app.z.a(:1827)
at android.support.v4.app.d.c(:797)
at android.support.v4.app.z.a(:2596)
at android.support.v4.app.z.b(:2383)
at android.support.v4.app.z.c(:2338)
at android.support.v4.app.z.p(:2245)
at android.support.v4.app.t.run(:703)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6120)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.halfhp.fig.Fig" on path: DexPathList[[zip file "/data/app/com.poc2.irisa.plugandpos.poc2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.poc2.irisa.plugandpos.poc2-1/lib/arm, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.androidplot.Plot.a(:561)
at com.androidplot.Plot.a(:403)
at com.androidplot.Plot.<init>(:324)
at com.androidplot.xy.XYPlot.<init>(:143)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at com.poc2.irisa.plugandpos.poc2.o.a(:52)
at android.support.v4.app.m.b(:2346)
at android.support.v4.app.z.a(:1428)
at android.support.v4.app.z.h(:1759)
at android.support.v4.app.z.a(:1827)
at android.support.v4.app.d.c(:797)
at android.support.v4.app.z.a(:2596)
at android.support.v4.app.z.b(:2383)
at android.support.v4.app.z.c(:2338)
at android.support.v4.app.z.p(:2245)
at android.support.v4.app.t.run(:703)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6120)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
Thanks in advance.
Best regards,
Malo
Just answering for myself after finding the question having had the same issue.
I had to add the following to my "build.gradle" dependencies.
implementation "com.halfhp.fig:figlib:1.0.7"
I want to add footer in my listview by inflating a different layout.
here is my code ...
View loadMoreView, loading_img;
loading_img = ((LayoutInflater)this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
.inflate(R.layout.loading_img, null, false);
loadMoreView = ((LayoutInflater)this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
.inflate(R.layout.load_more_btn, null, false);
Here is xml file loading_img.xml code ....
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<pl.droidsonroids.gif.GifImageView
android:layout_width="match_parent"
android:layout_height="70dp"
android:id="#+id/loading_img"
android:src="#mipmap/progress_bar_default"
android:background="#color/pd_color1"
android:layout_marginLeft="20dp"
android:layout_marginRight="14dp"
android:layout_marginBottom="10dp"/>
</LinearLayout>
but it shows error....
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.plexusd.plexusd/com.plexusd.plexusd.Notification}: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2572)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class <unknown>
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.plexusd.plexusd.Notification.onCreate(Notification.java:104)
at android.app.Activity.performCreate(Activity.java:6337)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.plexusd.plexusd.Notification.onCreate(Notification.java:104)
at android.app.Activity.performCreate(Activity.java:6337)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.plexusd.plexusd.Notification.onCreate(Notification.java:104)
at android.app.Activity.performCreate(Activity.java:6337)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 3686412 byte allocation with 2971336 free bytes and 2MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:831)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:248)
at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:160)
at pl.droidsonroids.gif.GifDrawable.<init>(GifDrawable.java:95)
at pl.droidsonroids.gif.GifViewUtils.setResource(GifViewUtils.java:53)
at pl.droidsonroids.gif.GifViewUtils.getResourceId(GifViewUtils.java:41)
at pl.droidsonroids.gif.GifViewUtils.initImageView(GifViewUtils.java:29)
at pl.droidsonroids.gif.GifImageView.<init>(GifImageView.java:41)
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.plexusd.plexusd.Notification.onCreate(Notification.java:104)
at android.app.Activity.performCreate(Activity.java:6337)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
07-06 00:23:56.956 24424-24424/com.plexusd.plexusd I/Process: Sending signal. PID: 24424 SIG: 9
The cause is shown down at the bottom of stacktrace:
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 3686412 byte allocation with 2971336 free bytes and 2MB until OOM
The suggested ways to deal with OOM are:
If you are working with large-sized GIFs you can subsample them, see: #284 (comment)
You can use tools like MAT, or Memory Monitor in Android Studio to locate potential causes.
You can increase available heap space by using android:largeHeap="true" in AndroidManifest.xml or dividing app to
separate processes (by adding android:process tags) but those
workarounds may cause side-effects.
https://github.com/koral--/android-gif-drawable/issues/326
I'm trying to show a MapView inside a Fragment and I get an error when I inflate it:
03-21 14:34:44.234 32691-32691/com.example.javiersanzrozalen.fatrunners E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.javiersanzrozalen.fatrunners, PID: 32691
android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class com.google.android.gms.maps.MapView
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.google.android.gms.maps.MapView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at com.example.javiersanzrozalen.fatrunners.Fragments.NuevaCarreraFragment.onCreateView(NuevaCarreraFragment.java:53) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363 at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable; at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source) at com.google.android.gms.maps.MapView.<init>(Unknown Source) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at com.example.javiersanzrozalen.fatrunners.Fragments.NuevaCarreraFragment.onCreateView(NuevaCarreraFragment.java:53) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363 at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable" on path: DexPathList[[zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/base.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.javiersanzrozalen.fatrunners-2/lib/x86, /system/lib, /vendor/lib]]
03-21 14:34:44.234 32691-32691/com.example.javiersanzrozalen.fatrunners E/AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 27 more
Any idea ? This is the XML where I place my MapView:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Fragments.NuevaCarreraFragment">
<com.google.android.gms.maps.MapView
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
UPDATE
Finally solved it compiling the last version of Google Maps library recommended.
You are attempting to use the original version of Google Maps support for Android (com.google.android.maps). We refer to that now as Maps V1.
This will not work, as Maps V1 has been deprecated for over two years. You can no longer get API keys for it, so even if your code would be correct, it would not work. The crash is because the old MapView had to be used inside of a MapActivity, as the error indicates.
The current version of Google Maps support for Android — Maps V2 — has a very different API and does not involve classes in the com.google.android.maps package.
I am getting RuntimeException, InflateException, ClassNotFoundException.
my build.gradle have
compile 'com.android.support:appcompat-v7:24.2.1'
compile "com.google.firebase:firebase-auth:9.0.2"
and Logcat log is
Process: com.nikhil.firebase, PID: 10511
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nikhil.firebase/com.nikhil.firebase.SignUpActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2426)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.nikhil.firebase.SignUpActivity.onCreate(SignUpActivity.java:29)
at android.app.Activity.performCreate(Activity.java:6245)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.nikhil.firebase.SignUpActivity.onCreate(SignUpActivity.java:29)
at android.app.Activity.performCreate(Activity.java:6245)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.CoordinatorLayout" on path: DexPathList[[zip file "/data/app/com.nikhil.firebase-2/base.apk"],nativeLibraryDirectories=[/data/app/com.nikhil.firebase-2/lib/arm, /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.view.LayoutInflater.createView(LayoutInflater.java:583)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.nikhil.firebase.SignUpActivity.onCreate(SignUpActivity.java:29)
at android.app.Activity.performCreate(Activity.java:6245)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Suppressed: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.CoordinatorLayout" on path: DexPathList[[dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-support-annotations-24.2.1_6a41e66d0de39617155341541059c34ffee72147-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.nikh
You need to add this dependency. It should work after you add it and do clean build :
compile 'com.android.support:design:24.2.1'
Please let me know if it changes anything for you.
ArrayAdapter < String > dataAdapter = new ArrayAdapter < String >
(this, R.layout.spinner_list_item, list0);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
dataAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);
} else {
dataAdapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_custom);
}
mSpinner0.setAdapter(dataAdapter);
I also tried above code but no results..
I am using custom xml adpter.setDropDownViewResource() method like dataAdapter.setDropDownViewResource
(R.layout.simple_spinner_dropdown_custom);
There is total 3 spinner in my Layout.
It's working fine with other 2 Spinner But fist spinner click gives me this error in Android 6.0.
It's working fine in Android L (API-22)
Please help.
Thanks in advance.
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:textColor="#color/normal_color"
android:ellipsize="marquee"
android:padding="10dp"
android:background="#color/white"
android:layout_height="wrap_content" />
log
E/GAv4: Successfully bound to service but never got onServiceConnected
callback E/AndroidRuntime: FATAL EXCEPTION: main Process: com.abc.xyz, PID: 22725
android.view.InflateException: Binary XML file line #19: Binary XML file
line #19: Error inflating class <unknown> at
android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
atandroid.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378)
at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:448)
at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:963)
at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:959)
at android.widget.Spinner.measureContentWidth(Spinner.java:833)
at android.widget.Spinner$DropdownPopup.computeContentWidth(Spinner.java:1194)
at android.widget.Spinner$DropdownPopup.show(Spinner.java:1220)
at android.widget.Spinner.performClick(Spinner.java:758)
at android.view.View$PerformClick.run(View.java:21163)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
atcom.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at
android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)at
android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378)
at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:448)
at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:963) at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:959) at android.widget.Spinner.measureContentWidth(Spinner.java:833) at android.widget.Spinner$DropdownPopup.computeContentWidth(Spinner.java:1194) at android.widget.Spinner$DropdownPopup.show(Spinner.java:1220) at android.widget.Spinner.performClick(Spinner.java:758) at android.view.View$PerformClick.run(View.java:21163) at android.os.Handler.handleCallback(Handler.java:746) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) at android.view.LayoutInflater.createView(LayoutInflater.java:619)at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)at
android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378)
at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:448)
at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:963)
at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:959)
at android.widget.Spinner.measureContentWidth(Spinner.java:833)
at android.widget.Spinner$DropdownPopup.computeContentWidth(Spinner.java:1194)
at android.widget.Spinner$DropdownPopup.show(Spinner.java:1220)
at android.widget.Spinner.performClick(Spinner.java:758)
at android.view.View$PerformClick.run(View.java:21163)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}
at android.content.res.TypedArray.getColorStateList(TypedArray.java:482)
at android.widget.TextView.<init>(TextView.java:750)
at android.widget.TextView.<init>(TextView.java:671)
at android.widget.TextView.<init>(TextView.java:667)
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:619) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378)
at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:448)
at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:963)
at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:959)
at android.widget.Spinner.measureContentWidth(Spinner.java:833)
at android.widget.Spinner$DropdownPopup.computeContentWidth(Spinner.java:1194)
at android.widget.Spinner$DropdownPopup.show(Spinner.java:1220)
at android.widget.Spinner.performClick(Spinner.java:758)
at android.view.View$PerformClick.run(View.java:21163)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I had the same issue. It happens if you add a theme to your drop down item. You should apply a theme only to your spinner. In your case, you have added a style to the TextView. You have not posted what that style contains, but if it has a theme such as
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="#style/ThemeOverlay.AppCompat.Light"
you need to remove it.