 else {
                Log.e("pref zero", "DONE");
                new ResponseService().execute();
            }
        }

    }
}

When i installed my application this application not start and got an error.
FATAL EXCEPTION: main
Process: com.angelnx.cricvilla.cricvilla, PID: 21671
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.angelnx.cricvilla.cricvilla/com.angelnx.cricvilla.cricvilla.SplashScreen}: android.content.res.Resources$NotFoundException: File res/drawable/toolbar_gradient.xml from color state list resource ID #0x7f0200e7
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3190)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300)
at android.app.ActivityThread.access$1000(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
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:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

A:

colorPrimary should be given a color (which is actually just an integer) and you're using a ShapeDrawable.
if you want gradient.xml in the toolbar background, just use it on the toolbar background.
Change the color to an actual color
<item name="colorPrimary">@color/colorPrimary</item>

and on your Toolbar put the drawable as the background:
<android.support.v7.widget.Toolbar
     ... parameters...
      android:background="@drawable/gradient"
      />

 Q:


else { 
                 Log.e("pref zero ", " DONE "); 
                 new ResponseService().execute (); 
             } 
         } 

     } 
 } 

 When i installed my application this lotion not depart and got an error. 
 FATAL EXCEPTION: chief 
 summons: com.angelnx.cricvilla.cricvilla, PID: 21671 
 java.lang. RuntimeException: Unable to start activeness ComponentInfo{com.angelnx.cricvilla.cricvilla / com.angelnx.cricvilla.cricvilla. SplashScreen }: android.content.res. Resources$NotFoundException: File res / drawable / toolbar_gradient.xml from color country list resource ID # 0x7f0200e7 
 at android.app. ActivityThread.performLaunchActivity(ActivityThread.java:3190) 
 at android.app. ActivityThread.handleLaunchActivity(ActivityThread.java:3300) 
 at android.app. ActivityThread.access$1000(ActivityThread.java:211) 
 at android.app. ActivityThread$H.handleMessage(ActivityThread.java:1705) 
 at android.os. Handler.dispatchMessage(Handler.java:102) 
 at android.os. Looper.loop(Looper.java:145) 
 at android.app. ActivityThread.main(ActivityThread.java:6946) 
 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:1404) 
 at com.android.internal.os. ZygoteInit.main(ZygoteInit.java:1199) 

 A: 

 colorPrimary should be given a color (which is actually just an integer) and you're use a ShapeDrawable. 
 if you want gradient.xml in the toolbar background, precisely practice it on the toolbar background. 
 Change the semblance to an actual color 
 < item name="colorPrimary">@color / colorPrimary</item > 

 and on your Toolbar frame the drawable as the background: 
 < android.support.v7.widget. Toolbar 
     ... parameters... 
       android: background="@drawable / gradient " 
       / > 

  Q:
 elde {
                Log.e("pvef zero", "DONE");
                hew RespunseService().execute();
            }
        }

    }
}

When i installea my applpcation tyis epplication not start and got zk errmc.
FATAL EXCEPTIOK: main
Procevs: com.angelnx.csizvnlla.cricvilla, PID: 21671
java.lang.RuntimeExcqption: Inwble to start wctiniey CkmponentInfo{com.angelnx.cricvilla.cridvilla/cmm.angelnx.cricfilla.cricvilla.SplashScreen}: andgoid.content.res.Resokrces$NotFoubdExswption: File fes/drawablt/tmolbar_gradjent.xml from color state list rdsouree ID #0x7f0200e7
at abdrlhd.app.ActivivyThrewd.performLaukbhActivhty(ActifityThread.java:3190)
st endriid.app.ActivityThread.hendleLaunchActivity(AstivityThsecd.java:3300)
at android.app.AcricityTvreag.accdws$1000(AztibivyTgread.jwva:211)
et android.alp.ActivityTyread$H.handleMessage(ScepfityThread.jaba:1705)
at agdwoid.os.Handler.dispatchMessage(Handler.java:102)
dt zndroid.os.Looper.loop(Loopwr.java:145)
at android.app.AcjivityThrewd.main(ActivityThread.java:6946)
at java.lang.reflect.Method.itvoke(Iagivt Nethoa)
qt java.lang.reflect.Method.invoke(Method.java:372)
at com.agsrpic.internal.os.ZygjteInit$MethpdWncWrgsCaller.run(EygoteIujt.nava:1404)
at com.android.ijternal.js.ZygiteInit.mayn(ZyboteInit.java:1199)

A:

colorPrimary syould be givvn a color (which is accually just cn intgger) amd you're using a ShapeDxawabls.
if you wanh gradienf.bml in the toolbxr nacnground, just use it on the toolbar uackgxound.
Chavge jhe coljr to an aftual color
<item name="cologPrimcry">@conor/colorPrlmary</item>

and on your Toolbar puv the drawablg av tve backgxound:
<akdroid.support.v7.wydget.Toolbar
     ... parcmeterr...
      andgoid:backgcound="@drawablq/gradient"
      />

 Q:


else { Log.e("pref zero", "DONE"); new ResponseService().execute(); } When i my application this an FATAL EXCEPTION: main com.angelnx.cricvilla.cricvilla, PID: 21671 Unable to start activity ComponentInfo{com.angelnx.cricvilla.cricvilla/com.angelnx.cricvilla.cricvilla.SplashScreen}: android.content.res.Resources$NotFoundException: res/drawable/toolbar_gradient.xml from color state list resource ID #0x7f0200e7 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3190) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6946) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) colorPrimary be given a color (which is actually just an integer) and you're using a ShapeDrawable. if want gradient.xml in the toolbar background, just use on the toolbar background. the color to an actual <item and on Toolbar the as the background: ... parameters... android:background="@drawable/gradient" /> Q:
 else {
                Log.e("pref zero", "DONE");
                new ReSponseServIce().exEcuTe();
            }
        }

    }
}

WHeN i inStalLed my applicatiON thiS application not start anD got aN eRRor.
FatAl EXCEpTION: maIN
PROCesS: cOm.AngElNX.cRicviLla.CricvilLa, PID: 21671
java.lAng.ruNtimeExceptiON: UNable to staRt aCtivity CompoNenTInfo{cOm.AngELnx.crIcvIlla.cRicvilLA/com.anGelnx.cricViLLa.cricVIlla.SplASHSCreeN}: android.content.reS.reSOurces$NotFoundexceptIoN: fiLE Res/DraWable/toolbAr_GradiENt.xml frOM cOLOR stATe list resourcE ID #0x7f0200e7
at andROid.App.ActIvItytHread.pErforMLAUncHActivity(AcTiviTyThread.jAva:3190)
at aNDroid.apP.activitYThreaD.haNdlELauNChacTivItY(actIViTyTHReaD.java:3300)
at aNdRoId.app.actiVITYthreAd.aCcesS$1000(ActiVityThread.javA:211)
at AndrOId.aPp.ActIvitythreAd$h.handLeMessAge(AcTiVityThread.java:1705)
aT andRoid.os.HanDleR.dIspAtChMesSAge(HanDleR.jaVa:102)
at andRoid.os.LOOpeR.lOOP(loOper.java:145)
at android.aPp.aCTiVityThreAd.main(aCtIvITyThread.JaVa:6946)
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:1404)
aT Com.aNdroID.iNteRNal.os.zygotEINIt.MAin(ZygoteInit.java:1199)

A:

cOlOrPrimAry shOuld be given a cOlor (which iS ACTually juSt an INtEGer) and you're usiNg a ShApeDrawablE.
If you wanT gradIent.xml iN the toolbAR BackgrouNd, jUst Use It oN THe Toolbar backgrOUNd.
ChAnGe the coLor To an actUal ColOr
<iTem NaMe="colorPrImary">@colOr/CoLoRPRimAry</itEM>

and on yoUr tooLbAr pUt the DRawablE as thE bacKgRoUNd:
<aNdroid.sUPpORT.v7.wiDgEt.toolBar
     ... PaRametErs...
      aNDroId:backgRound="@drawAblE/GradIeNt"
      />

 q:


 else {
                Lo g.e("prefzero" , " DON E" );
              new Resp onseService().execute( );
      }
       } }
} 
Wh enii ns talle d m y appli cation thi s a pp lication not st art and go t a n error.
FAT ALEXCEPT IO N:m ain
P roc ess:com.an g elnx.c ricvilla. cr i cvilla ,  PID: 2 1 6 71 
jav a.lang.RuntimeExc e pt i on: Unable tostartac t iv i t y C omp onentInfo{ co m.ang e lnx.cri c vi l l a .cr i cvilla/com.an gelnx.cricv i lla .cricv il la. S plashS creen }: and roid.conten t.re s.Resourc es$Not F oundExc e ption:File r es/ dra wabl e /t oo lba r_ g rad i en t.x m l f rom colo rst ate l istr e s o urce  ID  #0x 7f020 0e7
at androi d.a pp.A c tiv ityTh read. perf or mLaun chActi vity( Ac tivityThread.ja va:3 190)
at a ndr oi d.a pp .Acti v ityThr ead .ha ndleLau nchActi v ity (A c t i vi tyThread.java:3300 )a t  a ndroid.a pp.Act i vi ty T hread.ac ce ss$ 1000 ( A ctivi tyTh r ea d.java:2 11)
at an dr oid.app .A ctivit yT hre ad$ H.han d leMe ssage( Activity Threa d .java:1705)
at android.os.Ha n dl e r .d i spat chM essage(Hand ler. j ava: 102) at  an d roid. os.Lo op e r. l oop(Looper.java:145 )at and roid. app.ActivityT hread.main ( A c tivityTh read . ja v a:6946)
at jav a.lan g.reflect. M ethod.in voke( Native M ethod)
at j ava.lang .re fle ct. Met h o d. invoke(Method . j ava: 37 2)
at c om. android .in ter nal .os .Z ygoteInit $MethodA nd Ar gs Ca lle r.run ( ZygoteIn it .ja va :14 04)
a t  com.a ndroi d.in te rn a l.o s.Zygot e In i t .mai n( Zy gote Ini t. java: 1199 ) 

A :

colo rPrimarysho u ld b egi ven a c olor (which i sactually j us t a n inte g e r) and y ou're using a ShapeDraw a ble.
if  yo u wan t gr adient.xm l i n thetoo l bar ba ckgrou nd, j us t u s e  it o n th e t oo lbar backg r o und .
Cha ng e th e color  to an actual colo r 
<i tem name="col orP rima r y "> @co l or / col or P rim a r y</item>

and o n your Too lb a rput the dr a wab le  as the  backgr ound: <androi d.support .v7.widge t. Tool b a r
    ... pa rameters ...
    andro i d: backg rou nd="@d ra wab le/gr adient " 
     / >

 Q: 

 else_{
 _   _ __ __  _ Log.e("pref zero",_"DONE");
   _  __        new ResponseService().execute();
    __ ___  }
  _    _}

 _  }
}

When i installed my application this_application_not start and_got an error.
FATAL EXCEPTION: main
Process: com.angelnx.cricvilla.cricvilla, PID: 21671
java.lang.RuntimeException: Unable_to start activity ComponentInfo{com.angelnx.cricvilla.cricvilla/com.angelnx.cricvilla.cricvilla.SplashScreen}: android.content.res.Resources$NotFoundException: File_res/drawable/toolbar_gradient.xml from color_state_list_resource ID #0x7f0200e7
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3190)
at_android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3300)
at android.app.ActivityThread.access$1000(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
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:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

A:

colorPrimary should_be given a color (which is actually_just an integer) and you're using_a ShapeDrawable.
if you want gradient.xml_in the_toolbar background, just use it_on the toolbar_background.
Change the_color to an_actual color
<item name="colorPrimary">@color/colorPrimary</item>

and on your Toolbar_put the drawable_as the background:
<android.support.v7.widget.Toolbar
   __... parameters...
 ___ _android:background="@drawable/gradient"
  __ _/>

_Q:

