android - Binary XML File, Error Inflating Class, What is the issue? -


i'm getting error when application changing layout. resolution of images fine other layouts when comes particular layout, crashes. tried using simple design colours layout , there wasn't crashes. hence, know if it's memory issue or whether if it's resolution issue. please note inexperience android studio user , appreciate if can advise on problem , whether if there solution

logcat:

java.lang.runtimeexception: unable start activity componentinfo{com.fluke.kgwee.flukegame/com.fluke.kgwee.flukegame.endactivity}: android.view.inflateexception: binary xml file line #1: binary xml file line #1: error inflating class <unknown>         @ android.app.activitythread.performlaunchactivity(activitythread.java:2416)         @ android.app.activitythread.handlelaunchactivity(activitythread.java:2476)         @ android.app.activitythread.-wrap11(activitythread.java)         @ android.app.activitythread$h.handlemessage(activitythread.java:1344)         @ android.os.handler.dispatchmessage(handler.java:102)         @ android.os.looper.loop(looper.java:148)         @ android.app.activitythread.main(activitythread.java:5417)         @ java.lang.reflect.method.invoke(native method)         @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:726)         @ com.android.internal.os.zygoteinit.main(zygoteinit.java:616) 

layout before app crashes:

<viewflipper     android:layout_width="match_parent"     android:layout_height="120dp"     android:id="@+id/viewflipper"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"     android:layout_margintop="175dp">      <linearlayout         android:orientation="horizontal"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_margintop="30dp"         android:gravity="center_horizontal">          <imageview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/imageview"             android:background="@drawable/pq1"             android:layout_alignparenttop="true"             android:layout_centerhorizontal="true" />     </linearlayout>      <linearlayout         android:orientation="horizontal"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_margintop="30dp"         android:gravity="center_horizontal">          <imageview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/imageview2"             android:background="@drawable/pq2"             android:layout_alignstart="@+id/imageview" />     </linearlayout> </viewflipper>  <linearlayout     android:orientation="horizontal"     android:layout_width="match_parent"     android:layout_height="135dp"     android:layout_margintop="160dp">      <imagebutton         android:layout_width="35dp"         android:layout_height="35dp"         android:id="@+id/prev"         android:background="@drawable/leftarrow"         android:layout_marginleft="25dp"         android:layout_margintop="55dp"         android:contentdescription="@string/buttonprev" />      <imagebutton         android:layout_width="35dp"         android:layout_height="35dp"         android:id="@+id/next"         android:background="@drawable/arrow"         android:layout_marginleft="230dp"         android:layout_margintop="55dp"         android:contentdescription="@string/buttonnext"         android:clickable="true" />  </linearlayout>  <linearlayout     android:orientation="horizontal"     android:layout_width="match_parent"     android:layout_height="135dp"     android:layout_margintop="275dp">      <imagebutton         android:layout_width="55dp"         android:layout_height="55dp"         android:id="@+id/imagebutton3"         android:background="@drawable/leftarrow"         android:layout_marginleft="5dp"         android:layout_margintop="55dp" />      <imagebutton         android:layout_width="55dp"         android:layout_height="55dp"         android:id="@+id/imagebutton4"         android:background="@drawable/arrow"         android:layout_marginleft="230dp"         android:layout_margintop="55dp" /> </linearlayout>  <linearlayout     android:orientation="horizontal"     android:layout_width="match_parent"     android:layout_height="135dp"     android:layout_margintop="385dp">      <imagebutton         android:layout_width="55dp"         android:layout_height="55dp"         android:id="@+id/imagebutton5"         android:background="@drawable/leftarrow"         android:layout_marginleft="5dp"         android:layout_margintop="55dp" />      <imagebutton         android:layout_width="55dp"         android:layout_height="55dp"         android:id="@+id/imagebutton6"         android:background="@drawable/arrow"         android:layout_marginleft="230dp"         android:layout_margintop="55dp" /> </linearlayout>  <textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="scoreboard:"     android:textsize="20sp"     android:textstyle="bold"     android:id="@+id/textview"     android:textcolor="#010101"     android:layout_alignparenttop="true"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"     android:layout_margintop="30dp" />  <imageview     android:layout_width="125dp"     android:layout_height="125dp"     android:id="@+id/imageview13"     android:layout_alignparentright="true"     android:layout_alignparentend="true"     android:background="@drawable/target1"     android:layout_margintop="30dp" /> 

it seems outofmemoryerror.check whether if loading large bitmaps in xml , rid of or manage properly


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -