Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Zainul Dedanwala
686 PointsError:(33) No resource identifier found for attribute 'nestedScrollingEnabled' in package 'android'
Error:(33) No resource identifier found for attribute 'nestedScrollingEnabled' in package 'android' THIS ERROR OCCURED SUDDENLY WORKING YESTERDAY ON CODING FOR AN ANDROID APP.THE PROGRAM AINT COMPILING BECAUSE I GOT THIS ERROR. WHAT TO DO TO GET RID OFF THIS ERROR.
Zainul Dedanwala
686 Pointspublic class FunFacts extends Activity { private FactBook mFactBook = new FactBook(); private ColorWheel mColorWheel = new ColorWheel(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fun_facts); final TextView factLabel = (TextView) findViewById(R.id.FactTextBox); Button showFactButton = (Button) findViewById(R.id.clickFactButton); final RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.relativeLayout); View.OnClickListener Listener = new View.OnClickListener() { @Override public void onClick(View view) { String Fact = mFactBook.getFact(); factLabel.setText(Fact); int color = mColorWheel.getColor(); relativeLayout.setBackgroundColor(color); } }; showFactButton.setOnClickListener(Listener);
Toast WelcomeToast = Toast.makeText(this,"Application Initialized",Toast.LENGTH_LONG);
WelcomeToast.show();
}
}
adamghani
7,955 PointsThis is the same version you posted, but well formatted.
public class FunFacts extends Activity {
private FactBook mFactBook = new FactBook();
private ColorWheel mColorWheel = new ColorWheel();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fun_facts);
final TextView factLabel = (TextView) findViewById(R.id.FactTextBox);
Button showFactButton = (Button) findViewById(R.id.clickFactButton);
final RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.relativeLayout);
View.OnClickListener Listener = new View.OnClickListener() {
@Override
public void onClick(View view) {
String Fact = mFactBook.getFact();
factLabel.setText(Fact);
int color = mColorWheel.getColor();
relativeLayout.setBackgroundColor(color);
}
};
showFactButton.setOnClickListener(Listener);
Toast WelcomeToast = Toast.makeText(this, "Application Initialized", Toast.LENGTH_LONG);
WelcomeToast.show();
}
}
Zainul Dedanwala
686 PointsYes. But the code line setContentView(R.layout.activity_fun_facts); The letter R appears red on the IDE and when I hover over it, it shows "Cannot Resolve Symbol 'R' ". And the Gradle message shows this error while running the code Error:(33) No resource identifier found for attribute 'nestedScrollingEnabled' in package 'android'
adamghani
7,955 Pointsadamghani
7,955 PointsHi Zainul, Please add in your code or link to a github repository, and include anything that might help us help you.
https://teamtreehouse.com/community/howto-guide-asking-forum-questions