jeudi 11 août 2016

Troubleshooting the stated error problem?

Sorry rather a newbie learning android studio where I downloaded a project http://ift.tt/2b69B30 to get my hands dirty with coding a camera app to upload to a server. Can anybody get it to work after downloading it? Because somehow I couldn't get it to work after I tried compiling it, with a error for this statement in the MainActivity.java file.

Code (Text):

  1. getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(getResources().getString(R.color.action_bar))));

I've tried changing the code statement to this but still not working -->

Code (Text):

  1. getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(ContextCompat.getColor(this,R.color.action_bar))));

Someone please help! Thanks

Let's block ads! (Why?)



Troubleshooting the stated error problem?

Aucun commentaire:

Enregistrer un commentaire