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 trialNicholas Nadel
454 PointsCannot be resolved or is not a field.
I've been experiencing major errors since adding the shake detector. I've downloaded the project files directly from the course to make sure I had no simple errors of my own doing.
I've been lurking in the Treehouse forums and StackOverflow to no avail.
It seems I've finally solved the import.R errors I'd been receiving all week. Now, I can't get past the following errors:
Description Resource Path Location Type
imageView1 cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 36 Java Problem
Project 'android-support-v7-gridlayout' is missing required source folder: 'gen' android-support-v7-gridlayout Build path Build Path Problem
Unable to resolve target 'android-17' until the SDK is loaded. android-support-v7-mediarouter Unknown Android Target Problem
textView1 cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 35 Java Problem
activity_main cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 32 Java Problem
Unable to resolve target 'android-19' until the SDK is loaded. appcompat_v7 Unknown Android Target Problem
The project cannot be built until build path errors are resolved android-support-v7-gridlayout Unknown Java Problem
Unable to resolve target 'android-7' until the SDK is loaded. android-support-v7-gridlayout Unknown Android Target Problem
action_settings cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 105 Java Problem
main cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 95 Java Problem
Unable to resolve target 'android-7' android-support-v7-gridlayout Unknown Android Target Problem
crystal_ball cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 80 Java Problem
ball_animation cannot be resolved or is not a field MainActivity.java /CrystalBall/src/com/example/crystalball line 63 Java Problem
Will this class continue to be updated with solutions (such as with the theme error in "Adding an Image")?
2 Answers
Daniel Hartin
18,106 PointsNot sure if it's connected or not! but there is a fault with the android plug-in version 2.3 (if you've updated your tools using the SDK manager) I kept getting similar messages when nothing was wrong with my code. I had to re-download the ADT bundle from the link attached to the android video in building a simple android app and re-install after removing all old ADT files.
Ben Jakuben
Treehouse TeacherSorry for your trouble, and sorry I missed this! I'm working on an update now that takes into account a few things from the latest release of Android (currently in beta). It sounds like something is off with your project automatically importing the Android support library. Can you zip up your project and send it to help@teamtreehouse.com? I'll take a look and let you know in here what the fix is.