android studio 3.0 - failed linking file resource. - I am getting this error even after trying all possible solution provided by others

This is the java file that is giving the errorpackage com.example.daksh.timetable;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.ImageView;public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final Button mon_but,tue_but,wed_but,thur_but,fri_but; mon_but = (Button)findViewB...Read more

android studio 3.0 - Failed linking file resources

This is the java file that is giving the errorpackage com.example.daksh.timetable;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.ImageView;public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final Button mon_but,tue_but,wed_but,thur_but,fri_but; mon_but = (Button)findViewB...Read more

android resources - What path format should I use with bitmapfactory.decodeFile(string pathname)?

I want to use the function bitmapfactory.decodeFile(string pathname).But on using it, NULL is being returned.Please specify what or how to WRITE the PATHNAME, with an example.for(int j=0;j<3;j++){ img_but[count].setImageBitmap(BitmapFactory.decodeFile("/LogoQuiz/res/drawable-hdpi/logo0.bmp")); linear[i].addView(img_but[count]); count++;}Instead of such a pathname, what should be used?...Read more

Android drawable resources: how to change color scheme based on version of application

I am trying to implement two different versions of the same application, the only difference being the color scheme. How would I go about displaying different drawables based on the version? For example, let's say I have a Blue version and a Red version. I would like to use the same source code for both but have an easy way to convert between the two color schemes. I am confused on how I would tell Android that I want to use the Blue version (or Red) and have it access files perhaps in resources/drawables/Blue or resources/drawables/Red. I foun...Read more

android resources - Adding images to R object

I'm having a problem calling images that are sitting inside the res folder, and I assume I'm doing something wrong.I've read several posts in SOF stating that all i need to do is to add all the images in a flat way to the res folder:But I can't reach them in the code below (the code in under MapsActivity)private BitmapDescriptor getMarkerIcon(Job.jobTypes jobType){ switch ((jobType)) { case LIFESTYLE: return BitmapDescriptorFactory.fromResource(android.R.drawable.lifestyle); <-- states it cannot find the r...Read more